##// END OF EJS Templates
commandserver: use selectors2...
Jun Wu -
r33503:27d23fe3 default
parent child Browse files
Show More
@@ -22,6 +22,7 b' from . import ('
22 22 encoding,
23 23 error,
24 24 pycompat,
25 selectors2,
25 26 util,
26 27 )
27 28
@@ -476,6 +477,8 b' class unixforkingservice(object):'
476 477 def _mainloop(self):
477 478 exiting = False
478 479 h = self._servicehandler
480 selector = selectors2.DefaultSelector()
481 selector.register(self._sock, selectors2.EVENT_READ)
479 482 while True:
480 483 if not exiting and h.shouldexit():
481 484 # clients can no longer connect() to the domain socket, so
@@ -486,7 +489,7 b' class unixforkingservice(object):'
486 489 self._unlinksocket()
487 490 exiting = True
488 491 try:
489 ready = select.select([self._sock], [], [], h.pollinterval)[0]
492 ready = selector.select(timeout=h.pollinterval)
490 493 if not ready:
491 494 # only exit if we completed all queued requests
492 495 if exiting:
General Comments 0
You need to be logged in to leave comments. Login now