Robert Klemme <shortcutter / googlemail.com> wrote:
> On 03/01/2011 08:16 PM, Eric Wong wrote:
>> Robert Klemme<shortcutter / googlemail.com>  wrote:
>>>> 1.8 will schedule other threads if the blocking IO is for a socket/pipe
>>>> and uses the normal Ruby IO interfaces (or the extension author was
>>>> careful).  Filesystem I/O (including NFS) can block the entire process
>>>> in 1.8.
>>>
>>> Where do you take that from?  AFAIK internally Ruby 1.8.* uses non
>>> blocking IO calls in combination with select() to be able to let other
>>> threads work while IO is under way.
>>
>> Yes, I meant "blocking" from a user-visible perspective, not from a
>> kernel perspective.  If there's an EAGAIN it'll block the current thread
>> from a user perspective and schedule others using select(), but not
>> actually block on the syscall that caused EAGAIN.
>
> OK, but earlier you said that file system IO can block the entire  
> process - which is not exactly true and also does not match what you  
> said now. :-)

Filesystem IO (regular files) doesn't return EAGAIN (at least not on
systems I'm familiar with).

-- 
Eric Wong