SharedLocal#

class barecat.util.threading.SharedLocal[source]#

A dummy that acts like multiprocessing_utils.local() but isn’t thread-local.

Use this as the non-threadsafe alternative to multiprocessing_utils.local(). Both support arbitrary attribute access, but SharedLocal shares state across all threads while multiprocessing_utils.local() gives each thread its own copy.