Oct. 27, 2012
4:54 a.m.
On Sat, Oct 27, 2012 at 1:06 PM, Daniel Foerster <pydsigner@gmail.com> wrote:
So, are threads still an option? I feel that many of these problems with generators could be solved with threads.
No, because available operating systems can handle a few orders of magnitude more concurrent IO operations per process than they can handle threads per process. The idea of asynchronous programming is to only use additional threads when you really need them (i.e. for blocking synchronous operations with no asynchronous equivalent), thus providing support for a far greater number of concurrent operations per process than if you rely entirely on threads for concurrency. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia