コード例 #1
0
ファイル: processes.py プロジェクト: jarieb/celery
 def create_process_queues(self):
     inq, outq, synq = _SimpleQueue(), _SimpleQueue(), None
     inq._writer.setblocking(0)
     if self.synack:
         synq = _SimpleQueue()
         synq._writer.setblocking(0)
     return inq, outq, synq
コード例 #2
0
ファイル: prefork.py プロジェクト: omertoledano/celery
 def create_process_queues(self):
     """Creates new in, out (and optionally syn) queues,
     returned as a tuple."""
     inq, outq, synq = _SimpleQueue(), _SimpleQueue(), None
     inq._writer.setblocking(0)
     if self.synack:
         synq = _SimpleQueue()
         synq._writer.setblocking(0)
     return inq, outq, synq
コード例 #3
0
ファイル: asynpool.py プロジェクト: jdufresne/celery
 def create_process_queues(self):
     """Create new in, out, etc. queues, returned as a tuple."""
     # NOTE: Pipes must be set O_NONBLOCK at creation time (the original
     # fd), otherwise it won't be possible to change the flags until
     # there's an actual reader/writer on the other side.
     inq = _SimpleQueue(wnonblock=True)
     outq = _SimpleQueue(rnonblock=True)
     synq = None
     assert isblocking(inq._reader)
     assert not isblocking(inq._writer)
     assert not isblocking(outq._reader)
     assert isblocking(outq._writer)
     if self.synack:
         synq = _SimpleQueue(wnonblock=True)
         assert isblocking(synq._reader)
         assert not isblocking(synq._writer)
     return inq, outq, synq
コード例 #4
0
ファイル: asynpool.py プロジェクト: xn8x/celery
 def create_process_queues(self):
     """Creates new in, out (and optionally syn) queues,
     returned as a tuple."""
     # NOTE: Pipes must be set O_NONBLOCK at creation time (the original
     # fd), otherwise it will not be possible to change the flags until
     # there is an actual reader/writer on the other side.
     inq = _SimpleQueue(wnonblock=True)
     outq = _SimpleQueue(rnonblock=True)
     synq = None
     assert isblocking(inq._reader)
     assert not isblocking(inq._writer)
     assert not isblocking(outq._reader)
     assert isblocking(outq._writer)
     if self.synack:
         synq = _SimpleQueue(wnonblock=True)
         assert isblocking(synq._reader)
         assert not isblocking(synq._writer)
     return inq, outq, synq
コード例 #5
0
 def create_process_queuepair(self):
     inq, outq = _SimpleQueue(), _SimpleQueue()
     inq._writer.setblocking(0)
     return inq, outq
コード例 #6
0
ファイル: processes.py プロジェクト: linovia/celery
 def create_process_queuepair(self):
     return _SimpleQueue(), _SimpleQueue()