lsst.ctrl.pool  14.0-1-ga2912ff+12
Public Member Functions | Public Attributes | List of all members
lsst.ctrl.pool.pool.PickleHolder Class Reference
Inheritance diagram for lsst.ctrl.pool.pool.PickleHolder:

Public Member Functions

def __new__ (cls, hold=None)
 
def __init__ (self, hold=None)
 
def __enter__ (self)
 
def __exit__ (self, excType, excVal, tb)
 

Public Attributes

 obj
 

Detailed Description

Singleton to hold what's about to be pickled.

We hold onto the object in case there's trouble pickling,
so we can figure out what class in particular is causing
the trouble.

The held object is in the 'obj' attribute.

Here we use the __new__-style singleton pattern, because
we specifically want __init__ to be called each time.

Definition at line 125 of file pool.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.ctrl.pool.pool.PickleHolder.__init__ (   self,
  hold = None 
)
Hold onto new object

Definition at line 147 of file pool.py.

Member Function Documentation

◆ __enter__()

def lsst.ctrl.pool.pool.PickleHolder.__enter__ (   self)

Definition at line 152 of file pool.py.

◆ __exit__()

def lsst.ctrl.pool.pool.PickleHolder.__exit__ (   self,
  excType,
  excVal,
  tb 
)
Drop held object if there were no problems

Definition at line 155 of file pool.py.

◆ __new__()

def lsst.ctrl.pool.pool.PickleHolder.__new__ (   cls,
  hold = None 
)

Definition at line 140 of file pool.py.

Member Data Documentation

◆ obj

lsst.ctrl.pool.pool.PickleHolder.obj

Definition at line 150 of file pool.py.


The documentation for this class was generated from the following file: