mirror of
https://github.com/norohind/AudioControl.git
synced 2025-04-12 05:00:01 +03:00
Fix net bottleneck
This commit is contained in:
parent
f86b9e73ba
commit
875d7ce0c0
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user