Task local storage

This module provides the equivalent to threading.local but applying the concept to tasks.

class evergreen.local.local

A class that represents task-local data. Task-local data are data whose values are task specific. To manage task-local data, just create an instance of local (or a subclass) and store attributes on it

mydata = local()
mydata.x = 1

The instance’s values will be different for separate tasks.

Previous topic

Synchronization primitives: queues

Next topic

Managing timeouts

This Page