Browse Source

fix CPU usage

dev
破娃酱 8 years ago
parent
commit
2723295101
  1. 4
      shadowsocks/eventloop.py

4
shadowsocks/eventloop.py

@ -222,8 +222,8 @@ class EventLoop(object):
for callback in self._periodic_callbacks: for callback in self._periodic_callbacks:
callback() callback()
self._last_time = now self._last_time = now
if events and (handle is False): if events and not handle:
time.sleep(0.01) time.sleep(0.02)
def __del__(self): def __del__(self):
self._impl.close() self._impl.close()

Loading…
Cancel
Save