mirror of
https://github.com/norohind/AudioControl.git
synced 2026-10-22 21:32:09 +03:00
Fix net bottleneck
This commit is contained in:
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -83,7 +83,7 @@ class NetworkTransport(TransportABC):
|
||||
logger.opt(colors=False, exception=True).warning(f"Couldn't parse message from client: {data}")
|
||||
|
||||
def tick(self):
|
||||
events = self._selector.select(timeout=0)
|
||||
events = self._selector.select(timeout=0.1)
|
||||
for key, mask in events:
|
||||
callback = key.data
|
||||
callback(key.fileobj, mask)
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ class ServerSideView(Thread):
|
||||
def run(self) -> None:
|
||||
while self.running:
|
||||
try:
|
||||
msg: Events.Event = self.inbound_q.get(timeout=0.1)
|
||||
msg: Events.Event = self.inbound_q.get_nowait()
|
||||
|
||||
except queue.Empty:
|
||||
pass
|
||||
|
||||
Reference in new issue
Block a user