Пример #1
0
 def __reduce__(self):
     from .context import assert_spawning
     try:
         assert_spawning(self)
     except RuntimeError:
         raise TypeError('Pickling an AuthenticationKey object is '
                         'disallowed for security reasons')
     return AuthenticationKey, (bytes(self), )
Пример #2
0
 def __getstate__(self):
     context.assert_spawning(self)
     return self._reader, self._writer, self._rlock, self._wlock, self._copy_tensor
Пример #3
0
 def __getstate__(self):
     assert_spawning(self)
     return (self._lock, self._sleeping_count,
             self._woken_count, self._wait_semaphore)
Пример #4
0
 def __getstate__(self):
     assert_spawning(self)
     sl = self._semlock
     h = sl.handle
     return (h, sl.kind, sl.maxvalue, sl.name)
Пример #5
0
 def __getstate__(self):
     assert_spawning(self)
     return self._reader, self._writer, self._rlock, self._wlock
Пример #6
0
 def __getstate__(self):
     assert_spawning(self)
     return (self._ignore_epipe, self._maxsize, self._reader, self._writer,
             self._reducers, self._rlock, self._wlock, self._sem,
             self._opid)