Skip to content

Commit

Permalink
Minor concurrency tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Oct 25, 2024
1 parent 2b578d6 commit e9af2e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/viser/_gui_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ async def _handle_gui_updates(
assert False

if asyncio.iscoroutinefunction(cb):
self._event_loop.create_task(cb(GuiEvent(client, client_id, handle)))
await cb(GuiEvent(client, client_id, handle))
else:
self._thread_executor.submit(cb, GuiEvent(client, client_id, handle))

Expand Down
2 changes: 1 addition & 1 deletion src/viser/_viser.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def __init__(
Callable[[ClientHandle], None | Coroutine]
] = []

self._thread_executor = ThreadPoolExecutor(max_workers=8)
self._thread_executor = ThreadPoolExecutor(max_workers=32)

# For new clients, register and add a handler for camera messages.
@server.on_client_connect
Expand Down

0 comments on commit e9af2e5

Please sign in to comment.