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), )
def __getstate__(self): context.assert_spawning(self) return self._reader, self._writer, self._rlock, self._wlock, self._copy_tensor
def __getstate__(self): assert_spawning(self) return (self._lock, self._sleeping_count, self._woken_count, self._wait_semaphore)
def __getstate__(self): assert_spawning(self) sl = self._semlock h = sl.handle return (h, sl.kind, sl.maxvalue, sl.name)
def __getstate__(self): assert_spawning(self) return self._reader, self._writer, self._rlock, self._wlock
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)