@@ -36,7 +36,7 @@ class Runtime:
3636 key (str | None, optional): API key for authentication.
3737 If not provided, will use the EXOSPHERE_API_KEY environment variable.
3838 batch_size (int, optional): Number of states to fetch per poll. Defaults to 16.
39- workers (int, optional): Number of concurrent worker tasks . Defaults to 4.
39+ thread_count (int, optional): Number of concurrent worker threads . Defaults to 4.
4040 state_manage_version (str, optional): State manager API version. Defaults to "v0".
4141 poll_interval (int, optional): Seconds between polling for new states. Defaults to 1.
4242
@@ -83,7 +83,7 @@ def _validate_runtime(self):
8383 Validate runtime configuration.
8484
8585 Raises:
86- ValueError: If batch_size or workers is less than 1, or if required
86+ ValueError: If batch_size or thread_count is less than 1, or if required
8787 configuration (state_manager_uri, key) is not provided.
8888 """
8989 if self ._batch_size < 1 :
@@ -310,7 +310,7 @@ def _validate_nodes(self):
310310
311311 async def _worker_thread (self ):
312312 """
313- Worker task that processes states from the queue.
313+ Worker thread that processes states from the queue.
314314
315315 Continuously fetches states from the queue, executes the corresponding node,
316316 and notifies the state manager of the result.
@@ -340,17 +340,17 @@ async def _start(self):
340340 """
341341 Start the runtime event loop.
342342
343- Registers nodes, starts the polling and worker tasks , and runs until stopped.
343+ Registers nodes, starts the polling and worker threads , and runs until stopped.
344344
345345 Raises:
346346 RuntimeError: If the runtime is not connected (no nodes registered).
347347 """
348348 await self ._register ()
349349
350350 poller = asyncio .create_task (self ._enqueue ())
351- worker_tasks = [asyncio .create_task (self ._worker_thread ()) for _ in range (self ._thread_count )]
351+ worker_threads = [asyncio .create_task (self ._worker_thread ()) for _ in range (self ._thread_count )]
352352
353- await asyncio .gather (poller , * worker_tasks )
353+ await asyncio .gather (poller , * worker_threads )
354354
355355 def start (self ):
356356 """
0 commit comments