##// END OF EJS Templates
allow adjustable subprocess flush limit
MinRK -
Show More
@@ -36,6 +36,7 b' class OutStream(object):'
36 """A file like object that publishes the stream to a 0MQ PUB socket."""
36 """A file like object that publishes the stream to a 0MQ PUB socket."""
37
37
38 # The time interval between automatic flushes, in seconds.
38 # The time interval between automatic flushes, in seconds.
39 _subprocess_flush_limit = 256
39 flush_interval = 0.05
40 flush_interval = 0.05
40 topic=None
41 topic=None
41
42
@@ -105,7 +106,7 b' class OutStream(object):'
105 """flush possible pub data from subprocesses into my buffer"""
106 """flush possible pub data from subprocesses into my buffer"""
106 if not self._pipe_flag or not self._is_master_process():
107 if not self._pipe_flag or not self._is_master_process():
107 return
108 return
108 for i in range(100):
109 for i in range(self._subprocess_flush_limit):
109 if self._pipe_poller.poll(0):
110 if self._pipe_poller.poll(0):
110 msg = self._pipe_in.recv_multipart()
111 msg = self._pipe_in.recv_multipart()
111 if msg[0] != self._pipe_uuid:
112 if msg[0] != self._pipe_uuid:
General Comments 0
You need to be logged in to leave comments. Login now