def reduce_ctype(obj): assert_spawning(obj) if isinstance(obj, ctypes.Array): return (rebuild_ctype, (obj._type_, obj._wrapper, obj._length_)) else: return (rebuild_ctype, (type(obj), obj._wrapper, None)) return None
def __getstate__(self): assert_spawning(self) r = self._reader._semlock w = self._writer._semlock reader = Popen.duplicate_for_child(r.handle), r.kind, r.maxvalue writer = Popen.duplicate_for_child(w.handle), w.kind, w.maxvalue return (reader, writer)
def __getstate__(self): assert_spawning(self) return (self._maxsize, self._reader, self._writer, self._rlock, self._wlock, self._sem, self._opid)
def __getstate__(self): assert_spawning(self) return (self._reader, self._writer, self._rlock, self._wlock)
def __reduce__(self): assert_spawning(self) return synchronized, (self._obj, self._lock)
def __getstate__(self): assert_spawning(self) return self._state
def __getstate__(self): assert_spawning(self) sl = self._semlock return (Popen.duplicate_for_child(sl.handle), sl.kind, sl.maxvalue)
def __getstate__(self): assert_spawning(self) return (self._lock, self._sleeping_count, self._woken_count, self._wait_semaphore)
def __getstate__(self): assert_spawning(self) return (self._maxsize, int(os.fileNumbers[self._writer.fno].buffer.id), self._rlock, self._wlock, self._sem, self._opid)
def __reduce__(self): assert_spawning(self) return (synchronized, (self._obj, self._lock))
def reduce_ctype(obj): assert_spawning(obj) if isinstance(obj, ctypes.Array): return rebuild_ctype, (obj._type_, obj._wrapper, obj._length_) else: return rebuild_ctype, (type(obj), obj._wrapper, None)