IO.select timeout

$B5$$,$D$$$?$N$G$9$,!"(BIO.select $B$G!"(Btimeout $B$r;H$C$?$H$-!"(B
$B;XDj$7$?;~4V$h$jC;$$;~4V$GJV$C$F$/$k$3$H$,$"$j$^$9!#(B

% ./ruby -ve ’
10.times {
t1 = Time.now
IO.select([], nil, nil, 0.1)
t2 = Time.now
p t2-t1
}’
ruby 2.0.0dev (2011-10-31 trunk 33585) [i686-linux]
0.10039
0.09891
0.099981
0.099979
0.1
0.099936
0.099993
0.099502
0.104041
0.106985

$B$3$l$C$F!"@5$7$$$s$G$7$g$&$+(B?

$B5$$,$D$$$?$N$G$9$,!"(BIO.select $B$G!"(Btimeout $B$r;H$C$?$H$-!"(B
$B;XDj$7$?;~4V$h$jC;$$;~4V$GJV$C$F$/$k$3$H$,$"$j$^$9!#(B

[email protected]$7$/$J$$$H;W$$$^$9!#$"$H$G8+$F$*$-$^$9(B orz

$B$&$$!#!#(B
Mac OS X Lion, Fedora15 $B$G$O:F8=$7$^$;$s!#$b$7!"$=$A$i$N%F%9%H4D6-$,(B
[email protected]$C$?$j$9$k$H!V$"$"!"$`$+$7(BLinux$B$K$=$&$$$&%P%0$"$j$^$7$?$M!<!W$G(B
Won’t fix $B$$$-$J$N$G$9$,!"$I$&$G$7$g$&$+!#(B

$B%G%#%9%H%j!"(Bkernel version, glibc
version$B$,$o$+$k$H$b$&[email protected]_E*[email protected]$,(B
$B$G$-$k$+$b$7$l$^$;$s!#(B

2011$BG/(B11$B7n(B1$BF|(B2:28 KOSAKI Motohiro
[email protected]:

$B$&$$!#!#(B
Mac OS X Lion, Fedora15 $B$G$O:F8=$7$^$;$s!#$b$7!"$=$A$i$N%F%9%H4D6-$,(B
[email protected]$C$?$j$9$k$H!V$"$"!"$`$+$7(BLinux$B$K$=$&$$$&%P%0$"$j$^$7$?$M!<!W$G(B
Won’t fix $B$$$-$J$N$G$9$,!"$I$&$G$7$g$&$+!#(B

$B$O$$!#5$$,$D$$$?$N$O(B boron $B$G$9!#(B

$B%G%#%9%H%j!"(Bkernel version, glibc
version$B$,$o$+$k$H$b$&[email protected]_E*[email protected]$,(B
$B$G$-$k$+$b$7$l$^$;$s!#(B

% ./ruby -ve ’
10.times {
t1 = Time.now
IO.select([], nil, nil, 0.1)
t2 = Time.now
p t2-t1
}’
ruby 2.0.0dev (2011-10-31 trunk 33590) [i686-linux]
0.096616
0.099846
0.099918
0.104611
0.099275
0.099878
0.099902
0.099883
0.099908
0.099907
% lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 5.0.9 (lenny)
Release: 5.0.9
Codename: lenny
% uname -a
Linux boron 2.6.18-6-xen-686 #1 SMP Thu Nov 5 19:54:42 UTC 2009 i686
GNU/Linux
% /lib/libc.so.6
GNU C Library stable release version 2.7, by Roland McGrath et al.
Copyright © 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.3.2.
Compiled on a Linux >>2.6.26-2-amd64<< system on 2011-01-08.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
For bug reporting instructions, please see:
http://www.gnu.org/software/libc/bugs.html.

$B$^$?!"<j85$K$"$k!“F1$8$/(B Debian GNU/Linux 5.0.9 (Lenny) $B$G!”(B
kernel $B$,(B 2.6.26 $B$N4D6-$G$b:F8=$7$^$9!#(B

2011$BG/(B11$B7n(B1$BF|(B6:08 Tanaka A. [email protected]:

$B$^$?!"<j85$K$"$k!“F1$8$/(B Debian GNU/Linux 5.0.9 (Lenny) $B$G!”(B
kernel $B$,(B 2.6.26 $B$N4D6-$G$b:F8=$7$^$9!#(B

$BJL$N%^%7%s$G!"(B
Debian GNU/Linux 6.0.3 (squeeze) $B$G!"(BLinux 2.6.32
$B$J4D6-$G$O:F8=$7$J$$$N$G!"(B
$B$=$N$"$?$j$GD>$C$?$H$$$&$H$3$m$G$9$+$M!#(B

($B$3$N(B squeeze $B$J%^%7%s$K$O(B Linux 2.6.26 $B$bF~$C$F$$$?$N$G(B
$B$=$C$A$G;n$7$?$i:F8=$7$?$N$G!"$?$7$+$K(B kernel
$B$N0c$$$,G;8|$G$9!#(B)

$B$"$$$6$o$G$9(B

Mac OSX Snow Leopard $B$G$O:F8=$7$^$;$s$G$7$?!#(B

$ ./ruby -ve ’
10.times {
t1 = Time.now
IO.select([], nil, nil, 0.1)
t2 = Time.now
p t2-t1
}’
ruby 2.0.0dev (2011-11-01 trunk 33593) [x86_64-darwin10.8.0]
0.100253
0.100204
0.100134
0.100136
0.100167
0.100229
0.100126
0.100139
0.100125
0.100133

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs