components.PicklableBase¶
- class components.PicklableBase¶
Bases:
object
A base class for objects using locks for thread safety. All locks must have names ending on
_lock
.- __getstate__()¶
Gets called, when object is being pickled. Sets all variables ending on
_lock
toNone
.Returns: The dictionary describing the current state of the object.
- __setstate__(state)¶
Gets called, when object is being un-pickled. Sets all variables ending on
_lock
to a newthreading.Lock
instance.- Parameters
state (
Dict
[str
,Any
]) – The pickled state of the object as produced by__getstate__()
.- Return type