Eric Hodel
8/14/2007 9:27:00 AM
On Aug 13, 2007, at 23:54, Sylvain Joyeux wrote:
> On Monday 13 August 2007, Roger Pack wrote:
>> Hmm. If you create a method thus:
>> class TCPSocket
>> def readableNow?
>> r,w,e = select([self],nil,nil,0)
>> return r != nil
>> end
>> end
>>
>> It turns out to use a select OTHER than IO.select. Anyone know, by
>> chance what the 'internal' select method does?
> It cannot use IO.select since IO.select is a singleton method of IO
> and a
> TCPSocket object is an instance of IO. The only way to explicitely get
> IO.select is to call
> r,w,e = IO.select(...)
>
> It calls Kernel#select. And I wouldn't be surprised if
> Kernel#select and
> IO.select were actually the same method ...
They are.
--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars