From: Lothar Scholz Date: 2005-08-10T07:22:35+09:00 Subject: Re: event driven framework for ruby Hello Yohanes, YS> James Edward Gray II writes: >> On Aug 9, 2005, at 2:22 PM, Yohanes Santoso wrote: >> >>> Disk I/O will always block the process executing it. only way to avoid >>> that is to have another process do the disk I/O (at least on linux, >>> *bsd; there used to have a unix that does not have this limitation, >>> but i can't remember the name). Using native thread also does not help >>> since the whole process is blocked. >> >> Non-blocking IO is another solution. >> >> James Edward Gray II YS> I know no POSIX system that honours O_NONBLOCK for disk I/O. That YS> includes linux, *bsd. YS> OTOH, AsyncIO is supposed to be a solution to this problem. But except YS> for win32, AsyncIO support on posix systems is spotty. It should work on linux even if the linux implementation is done really bad by starting one thread for each async operation (using a thread pool to speed this a little bit up) - at least this was how it was implemented a few years ago. But the API is there, stable and an offical POSIX conform standard. -- Best regards, emailto: scholz at scriptolutions dot com Lothar Scholz http://www.ruby-ide.com CTO Scriptolutions Ruby, PHP, Python IDE 's