You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A background thread is created when the library is imported. This thread is used for tracing and having tracing disabled has no effect on this, as it is evaluated after the thread creation.
This is in my opinion quite bad and it causes issues in our environment, where we use process-based parallelization and require no extra threads to be running at the startup of the program. I am working around this by importing anything from the agents library inside my functions, not in the global file scope. Not ideal though.
My expectation would be, that the thread will be created either explicitly, or when needed - for example when the first Runner.run is called, or some tracing functionality is explicitly used for the first time.
The text was updated successfully, but these errors were encountered:
Closes#796. Shouldn't start a busy waiting thread if there aren't any
traces.
Test plan
```
import threading
assert threading.active_count() == 1
import agents
assert threading.active_count() == 1
```
Describe the bug
A background thread is created when the library is imported. This thread is used for tracing and having tracing disabled has no effect on this, as it is evaluated after the thread creation.
This is in my opinion quite bad and it causes issues in our environment, where we use process-based parallelization and require no extra threads to be running at the startup of the program. I am working around this by importing anything from the
agents
library inside my functions, not in the global file scope. Not ideal though.Debug information
Repro steps
Expected behavior
My expectation would be, that the thread will be created either explicitly, or when needed - for example when the first
Runner.run
is called, or some tracing functionality is explicitly used for the first time.The text was updated successfully, but these errors were encountered: