Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR #3607 starts a thread at import parsl time #3751

Open
benclifford opened this issue Jan 18, 2025 · 1 comment
Open

PR #3607 starts a thread at import parsl time #3751

benclifford opened this issue Jan 18, 2025 · 1 comment

Comments

@benclifford
Copy link
Collaborator

Describe the bug

Since PR #3607, import parsl starts a thread.

To Reproduce

>>> import threading
>>> threading.enumerate()
[<_MainThread(MainThread, started 140077973014336)>]
>>> import parsl
>>> threading.enumerate()
[<_MainThread(MainThread, started 140077973014336)>, <Thread(Thread-1 (__atexit), started 140077889824448)>]

Expected behavior

Importing parsl should not be doing global environment stuff like starting threads: things like this should start ideally at in .start() methods, or less preferably in config object initializers, and be cleaned up by the relevant shutdown method.

Environment
my laptop, master branch 6ac930e

cc @yadudoc @khk-globus

@benclifford
Copy link
Collaborator Author

I think, although I have not investigated, also starts a new thread in every place that runs parsl code - not only the submitting workflow where a user might explicitly says import parsl, but inside every individual htex worker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant