class documentation
Runtime for Temporal Python SDK.
Users are encouraged to use default
. It can be set with
set_default
. Every time a new runtime is created, a new internal
thread pool is created.
Runtimes do not work across forks.
Static Method | default |
Get the default runtime, creating if not already created. |
Static Method | set |
Set the default runtime to the given runtime. |
Method | __init__ |
Create a default runtime with the given telemetry config. |
Property | metric |
Metric meter for this runtime. This is a no-op metric meter if no metrics were configured. |
Instance Variable | _core |
Undocumented |
Instance Variable | _metric |
Undocumented |
Get the default runtime, creating if not already created.
If the default runtime needs to be different, it should be done with
set_default
before this is called or ever used.
Returns | |
Runtime | The default runtime. |
Set the default runtime to the given runtime.
This should be called before any Temporal client is created, but can change the existing one. Any clients and workers created with the previous runtime will stay on that runtime.
Parameters | |
runtime:Runtime | The runtime to set. |
errorbool | If True and default is already set, this will raise a RuntimeError. |
Create a default runtime with the given telemetry config.
Each new runtime creates a new internal thread pool, so use sparingly.