当前位置: 首页>>代码示例>>Python>>正文


Python forking.assert_spawning函数代码示例

本文整理汇总了Python中multiprocessing.forking.assert_spawning函数的典型用法代码示例。如果您正苦于以下问题:Python assert_spawning函数的具体用法?Python assert_spawning怎么用?Python assert_spawning使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了assert_spawning函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: reduce_ctype

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
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:7,代码来源:sharedctypes.py

示例2: __getstate__

    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)
开发者ID:sdiehl,项目名称:numpush,代码行数:8,代码来源:shmem_sync.py

示例3: __getstate__

 def __getstate__(self):
     assert_spawning(self)
     return (self._maxsize,
      self._reader,
      self._writer,
      self._rlock,
      self._wlock,
      self._sem,
      self._opid)
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:9,代码来源:queues.py

示例4: __getstate__

 def __getstate__(self):
     assert_spawning(self)
     return (self._reader, self._writer, self._rlock, self._wlock)
开发者ID:ChowZenki,项目名称:kbengine,代码行数:3,代码来源:queues.py

示例5: __reduce__

 def __reduce__(self):
     assert_spawning(self)
     return synchronized, (self._obj, self._lock)
开发者ID:524777134,项目名称:cpython,代码行数:3,代码来源:sharedctypes.py

示例6: __getstate__

 def __getstate__(self):
     assert_spawning(self)
     return self._state
开发者ID:jitrc,项目名称:real-racer,代码行数:3,代码来源:heap.py

示例7: __getstate__

 def __getstate__(self):
     assert_spawning(self)
     sl = self._semlock
     return (Popen.duplicate_for_child(sl.handle), sl.kind, sl.maxvalue)
开发者ID:webiumsk,项目名称:WOT-0.9.12-CT,代码行数:4,代码来源:synchronize.py

示例8: __getstate__

 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)
开发者ID:perkinslr,项目名称:pypyjs-release,代码行数:4,代码来源:queues.py


注:本文中的multiprocessing.forking.assert_spawning函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。