A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-February/071159.html below:

[Python-Dev] Twisted Isn't Specific (was Re: Trial balloon: microthreads library in stdlib)

[Python-Dev] Twisted Isn't Specific (was Re: Trial balloon: microthreads library in stdlib) [Python-Dev] Twisted Isn't Specific (was Re: Trial balloon: microthreads library in stdlib)Adam Olsen rhamph at gmail.com
Thu Feb 15 07:01:54 CET 2007
On 2/14/07, Phillip J. Eby <pje at telecommunity.com> wrote:
> When one is nested inside the other.  This isn't a common need, but it's
> occasionally useful if you need to switch back and forth between blocking
> and non-blocking code.  For example, suppose that you have some code that
> wants to offer a synchronous interface to an asynchronous library...  and
> the synchronous code is being called from a FastCGI "accept" event
> loop.  The inner code can't use the outer event loop, because the outer
> loop isn't going to proceed until the inner code is finished.

This would also let you wrap sys.stdout.write() in a nested event loop
so as to allow print statements to still work while you use have it
set to non-blocking mode, but I could see it argued that using print
statements at all is wrong at that point.

-- 
Adam Olsen, aka Rhamphoryncus
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4