homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients gvanrossum, vstinner, yselivanov
Date 2015年01月09日.15:41:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1420818060.36.0.207099929733.issue23208@psf.upfronthosting.co.za>
In-reply-to
Content
Yury Selivanov proposed something different in the past: add a "context" (or a context identifier) to tasks to be able to (indirectly) attach local variables to tasks.
"Add notion of context_id to event loop"
https://code.google.com/p/tulip/issues/detail?id=165
I don't know if BaseEventLoop._current_handle is too specific or might be implemented with a task context. The task context looks to be specific to tasks, whereas handles are very generic in asyncio: almost all functions in asyncio are called in the context of a handle.
Previous discussion related to task context:
"local context in event loop"
https://groups.google.com/forum/#!topic/python-tulip/zix5HQxtElg
"ThreadLocal analogue"
https://groups.google.com/forum/#!topic/python-tulip/j0cSjUGx8qk
See also the tasklocals project:
https://github.com/vkryachko/tasklocals 
History
Date User Action Args
2015年01月09日 15:41:00vstinnersetrecipients: + vstinner, gvanrossum, yselivanov
2015年01月09日 15:41:00vstinnersetmessageid: <1420818060.36.0.207099929733.issue23208@psf.upfronthosting.co.za>
2015年01月09日 15:41:00vstinnerlinkissue23208 messages
2015年01月09日 15:41:00vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /