boss.worker¶
Classes¶
Use the communication between two processes via a pipe to implement RPC. |
|
Use the communication between two processes via a pipe to implement RPC. |
Functions¶
|
Get the maximum number of worker processes to use. |
|
This launcher to start a new worker in it's own process |
|
This is the entry point in the worker. |
Module Contents¶
- boss.worker.get_max_workers() int[source]¶
Get the maximum number of worker processes to use.
For Windows systems, caps the worker count at 32. For other platforms, returns the total CPU count.
- Returns:
The maximum number of worker processes to use
- boss.worker.start_hero_in_worker(config, realm, boss_name, boss_loop)[source]¶
This launcher to start a new worker in it’s own process
- boss.worker.launch_worker(config, realm, boss_name, pipe)[source]¶
This is the entry point in the worker.
- class boss.worker.Worker(config, realm, boss_name, pipe)[source]¶
Bases:
boss.multiprocess.MultiprocessRPCUse the communication between two processes via a pipe to implement RPC.
In BOSS this is used to communicate between the BOSS object in the main process and the BOSSRemote running in a separate process. This becomes necessary since zenoh/rust/pyO3 does not allow to run in the main process and in dynamically generated processes.
- _loop¶
- _obj¶
- class boss.worker.WorkerRemote(loop, pipe)[source]¶
Bases:
boss.multiprocess.MultiprocessRPCUse the communication between two processes via a pipe to implement RPC.
In BOSS this is used to communicate between the BOSS object in the main process and the BOSSRemote running in a separate process. This becomes necessary since zenoh/rust/pyO3 does not allow to run in the main process and in dynamically generated processes.