A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-October/057467.html below:

[Python-Dev] Pre-PEP: Task-local variables

[Python-Dev] Pre-PEP: Task-local variables [Python-Dev] Pre-PEP: Task-local variablesJosiah Carlson jcarlson at uci.edu
Thu Oct 20 07:29:18 CEST 2005
"Phillip J. Eby" <pje at telecommunity.com> wrote:
> It's the responsibility of a coroutine scheduler to take a snapshot() when 
> a task is suspended, and to swap() it in when resumed.  So it doesn't 
> matter that you've changed what thread you're running in, as long as you 
> keep the context with the coroutine that "owns" it.
> 
> As I mentioned in the PEP, I don't think that we would bother having 
> Python-defined variables be context-specific until Python 3.0.  This is 
> mainly intended for the kinds of things described in the proposal: ZODB 
> current transaction, current database connection, decimal context, 
> etc.  Basically, anything that you'd have a thread-local for now, and 
> indeed most anything that you'd use a global variable and 'with:' for.
> 
> I don't see how that's even related.  This is simply a replacement for 
> thread-local variables that allows you to also be compatible with 
> "lightweight" (coroutine-based) threads.

I just re-read the proposal with your clarifications in mind.  Looks
good.  +1

 - Josiah

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