Python multiprocessing.context.assert_spawning() Examples

The following are 1 code examples of multiprocessing.context.assert_spawning(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module multiprocessing.context , or try the search function .
Example #1
Source File: context.py    From loky with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def assert_spawning(obj):
        if get_spawning_popen() is None:
            raise RuntimeError(
                '%s objects should only be shared between processes'
                ' through inheritance' % type(obj).__name__
            )