Example #1
0
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
Example #2
0
    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)
Example #3
0
 def __getstate__(self):
     assert_spawning(self)
     return (self._maxsize,
      self._reader,
      self._writer,
      self._rlock,
      self._wlock,
      self._sem,
      self._opid)
Example #4
0
 def __getstate__(self):
     assert_spawning(self)
     return (self._reader, self._writer, self._rlock, self._wlock)
Example #5
0
 def __reduce__(self):
     assert_spawning(self)
     return synchronized, (self._obj, self._lock)
Example #6
0
 def __getstate__(self):
     assert_spawning(self)
     return self._state
Example #7
0
 def __getstate__(self):
     assert_spawning(self)
     sl = self._semlock
     return (Popen.duplicate_for_child(sl.handle), sl.kind, sl.maxvalue)
Example #8
0
 def __getstate__(self):
     assert_spawning(self)
     return (self._lock, self._sleeping_count, self._woken_count, self._wait_semaphore)
Example #9
0
 def __getstate__(self):
     assert_spawning(self)
     return (self._reader, self._writer, self._rlock, self._wlock)
Example #10
0
 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)
Example #11
0
 def __getstate__(self):
     assert_spawning(self)
     return self._state
Example #12
0
 def __getstate__(self):
     assert_spawning(self)
     return (self._maxsize, self._reader, self._writer, 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)
 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)