The worker side of Python workers (Effect's NodeWorkerRunner).
layer provides the WorkerRunnerPlatform for code running in a
ThreadWorker or a ProcessWorker: its runner tells the parent it is
ready, calls the handler for each message the parent sends (with port id
0), sends replies back, and ends its run when the parent closes
it (or, in a process, goes away). Outside a worker, start fails with a
WorkerSpawnError. A worker's main program is typically::
fx.run_blocking_exit(MainLayer.launch())which ends once the parent closes the worker.
Values#
| Attribute | Type | Description |
|---|---|---|
layer | Layer[WorkerRunnerPlatform] | The |
On This Page
Values