pyrseus.core.pickle¶
Helpers for writing Executor classes that need to interact
with pickle-based serialization.
There are two main use cases:
To change the serializer to a more powerful one like cloudpickle. For examples, see the source code of
pyrseus.executors.cpprocess. It is a wrapper forProcessPoolExecutorthat uses cloudpickle instead ofpicklefor task and result serialization.To help users troubleshoot serialization problems. For examples, see the source code of:
pyrseus.executors.pinline: serializes tasks and results in the same thread and process as thesubmitcall, usingpickle.pyrseus.executors.cpinline: serializes tasks and results in the same thread and process as thesubmitcall, using cloudpickle.
Module Attributes
Represents the generic return type of a submitted callable. |
Functions
|
Calls |
Helper for creating executors that wrap |
|
|
Attempts to pickle and unpickle |
Classes
|
|
|
Creates a wrapper around an arbitrary Python object that forces it to be pickled with the chosen pickler, but a copy of the original unwrapped object is returned at unpickling time. |