Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
def reduce_handle(handle):
    if Popen.thread_is_spawning():
        return (None, Popen.duplicate_for_child(handle), True)
    dup_handle = duplicate(handle)
    _cache.add(dup_handle)
    sub_debug('reducing handle %d', handle)
    return (_get_listener().address, dup_handle, False)
Exemplo n.º 3
0
def reduce_handle(handle):
    if Popen.thread_is_spawning():
        return (None, Popen.duplicate_for_child(handle), True)
    dup_handle = duplicate(handle)
    _cache.add(dup_handle)
    sub_debug('reducing handle %d', handle)
    return (_get_listener().address, dup_handle, False)
Exemplo n.º 4
0
 def __getstate__(self):
     assert_spawning(self)
     sl = self._semlock
     return (Popen.duplicate_for_child(sl.handle), sl.kind, sl.maxvalue)
Exemplo n.º 5
0
 def __getstate__(self):
     assert_spawning(self)
     sl = self._semlock
     return (Popen.duplicate_for_child(sl.handle), sl.kind, sl.maxvalue)