refactor(gateway): type the housekeeping pool as an Executor

This commit is contained in:
kshitijk4poor
2026-09-27 00:36:01 +05:30
committed by kshitij
parent 9ceb36e974
commit d915436657
2 changed files with 2 additions and 1 deletions

View File

@@ -4339,7 +4339,7 @@ class GatewayRunner(
return GatewayRunner._get_or_create_pool(
self, "_executor", lambda: _UnboundedThreadExecutor(thread_name_prefix="hermes-gateway"))
def _get_housekeeping_executor(self) -> concurrent.futures.ThreadPoolExecutor:
def _get_housekeeping_executor(self) -> concurrent.futures.Executor:
"""Return the gateway-owned executor for best-effort session housekeeping."""
return GatewayRunner._get_or_create_pool(
self, "_housekeeping_executor",

View File

@@ -25,6 +25,7 @@ import pytest
from gateway.run import GatewayRunner
def _runner(cleanup=None, *, cleanup_timeout=0.5):
runner = GatewayRunner.__new__(GatewayRunner)
runner._executor_lock = threading.Lock()