Skip to content

Commit

Permalink
Clarify responsibilities when calling submit_task (#5152)
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 authored Feb 15, 2024
1 parent 9dfb1b2 commit 8c64c1b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions py/server/deephaven/server/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ def executor_names() -> List[str]:

def submit_task(executor_name: str, task: Callable[[], None]) -> None:
"""
Submits a task to run on a named executor. If no such executor exists, raises KeyError.
Submits a task to run on a named executor. If no such executor exists, raises KeyError. The provided task should
take care to set up any execution context or liveness scope to ensure that the task runs as intended.
Typically, tasks should not block on other threads. Ensure tasks never block on other tasks submitted to the same executor.
Typically, tasks should not block on other threads. Ensure tasks never block on other tasks submitted to the same
executor.
Args:
executor_name (str): the name of the executor to submit the task to
Expand Down

0 comments on commit 8c64c1b

Please sign in to comment.