GitHub

WorkerRunnerPlatformService

API reference for WorkerRunnerPlatformService.

Starts the runner of the worker this code runs in (Effect's WorkerRunner.WorkerRunnerPlatform).

Functions

__init__

__init__(start) -> None
ParameterTypeDescription
startCallable[[], Effect[WorkerRunner[Any, Any], WorkerError]]
def __init__(self, start: Callable[[], Effect[WorkerRunner[Any, Any], WorkerError]]) -> None:
    self._start = start

start

start() -> Effect[WorkerRunner[Any, Any], WorkerError]

The runner of the worker this code runs in; fails with a WorkerError (WorkerSpawnError) outside a worker.

Returns Effect[WorkerRunner[Any, Any], WorkerError]

def start(self) -> Effect[WorkerRunner[Any, Any], WorkerError]:
    """The runner of the worker this code runs in; fails with a
    ``WorkerError`` (``WorkerSpawnError``) outside a worker."""
    return self._start()