From: Eric Wong Date: 2011-03-01T18:27:20+09:00 Subject: Re: question: threads behaviour Raphael Bauduin wrote: > Hi, > > As ruby threads are so called green threads, what's the behaviour when > one thread is blocked on IO? They're only green threads on Ruby 1.8, 1.9 uses native threads. > If the thread is blocked on a system call, is the whole process, ie > all threads blocked because the kernel scheduler considers the process > as blocked on IO? Are there IOs blocking a thread without blocking the > whole ruby process? 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. -- Eric Wong