[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: PIL book - OS blocking calls
- From: bert <bestanf@...>
- Date: Thu, 23 Mar 2006 02:49:42 -0800 (PST)
I've been reading the PIL book, and on the above page, the author says that it is possible in most cases to use coroutines instead of 'classic' threads such as offered by the operating system. I agree, if the OS API gives the programmer the option of specifying a timeout for a call. But what if one is using an OS API that contains a blocking call, and there is no way to specify a timeout? Normally, this would be handled by making this blocking call in a thread. I don't see how this could be done with coroutines. am I missing something?
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.