lsst.ctrl.pool  21.0.0-2-ga326454+47d850feca
Public Member Functions | Public Attributes | List of all members
lsst.ctrl.pool.pool.PickleHolder Class Reference

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 126 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 148 of file pool.py.

Member Function Documentation

◆ __enter__()

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

Definition at line 153 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 156 of file pool.py.

◆ __new__()

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

Definition at line 141 of file pool.py.

Member Data Documentation

◆ obj

lsst.ctrl.pool.pool.PickleHolder.obj

Definition at line 151 of file pool.py.


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