skip to navigation
skip to content

Not Logged In

tasklocals 0.1

Task locals for Tulip/asyncio

Task locals support for tulip/asyncio
~~~~~~~~~~~~~~~~~~~~~

It provides Task local storage similar to python's threading.local
but for Tasks in asyncio.

Using task locals has some caveats:

* Unlike thread locals, where you are always sure that at least one thread is running(namely main thread), Task locals are available only in the context of a running Task. So if you try to access a task local from outside a Task you will get a RuntimeError.
* Be aware that using asyncio.gather and asyncio.shield launches a new task, so these coroutines will have its own local storage.

For more information on using locals see the docs for threading.local in python's standard library
 
File Type Py Version Uploaded on Size
tasklocals-0.1.tar.gz (md5) Source 2013-12-06 2KB
  • Downloads (All Versions):
  • 2 downloads in the last day
  • 18 downloads in the last week
  • 133 downloads in the last month