How to use the multiprocess.forking.assert_spawning function in multiprocess

To help you get started, we’ve selected a few multiprocess examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uqfoundation / multiprocess / py3.1 / multiprocess / sharedctypes.py View on Github external
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)
github uqfoundation / multiprocess / py3.1 / multiprocess / synchronize.py View on Github external
def __getstate__(self):
        assert_spawning(self)
        return (self._lock, self._sleeping_count,
                self._woken_count, self._wait_semaphore)
github uqfoundation / multiprocess / py3.2 / multiprocess / queues.py View on Github external
def __getstate__(self):
        assert_spawning(self)
        return (self._reader, self._writer, self._rlock, self._wlock)
github uqfoundation / multiprocess / py3.3 / multiprocess / queues.py View on Github external
def __getstate__(self):
        assert_spawning(self)
        return (self._reader, self._writer, self._rlock, self._wlock)
github uqfoundation / multiprocess / py2.6 / multiprocess / queues.py View on Github external
def __getstate__(self):
        assert_spawning(self)
        return (self._maxsize, self._reader, self._writer,
                self._rlock, self._wlock, self._sem, self._opid)
github uqfoundation / multiprocess / py2.7 / multiprocess / sharedctypes.py View on Github external
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)
github uqfoundation / multiprocess / py3.2 / multiprocess / queues.py View on Github external
def __getstate__(self):
        assert_spawning(self)
        return (self._maxsize, self._reader, self._writer,
                self._rlock, self._wlock, self._sem, self._opid)
github uqfoundation / multiprocess / py2.7 / multiprocess / synchronize.py View on Github external
def __getstate__(self):
        assert_spawning(self)
        return (self._lock, self._sleeping_count,
                self._woken_count, self._wait_semaphore)
github uqfoundation / multiprocess / py2.7 / multiprocess / synchronize.py View on Github external
def __getstate__(self):
        assert_spawning(self)
        sl = self._semlock
        return (Popen.duplicate_for_child(sl.handle), sl.kind, sl.maxvalue)
github uqfoundation / multiprocess / py3.3 / multiprocess / heap.py View on Github external
def __getstate__(self):
            assert_spawning(self)
            return self._state