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

Configure ThreadLoop to be daemon #1555

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eskildsf
Copy link

Configuring a sync Client object and connecting it to an OPC-UA host will cause the calling script to hang on exit if disconnect() is not called. By setting the ThreadLoop to be a daemon resolves this issue.

Configuring a sync Client object and connecting it to an OPC-UA host will cause the calling script to hang on exit if disconnect() is not called. By setting the ThreadLoop to be a daemon resolves this issue.
@oroulet
Copy link
Member

oroulet commented Jan 31, 2024

Is it safe?
not correctly closing things is often a very bad ideas. But maybe in that particular case it is worth it... not sure

@eskildsf
Copy link
Author

Hi @oroulet

I don't think I can say "yes" confidently. You probably have a better basis to make that call.

I will say though that it is quite useful for the Python session not to hang if you have an exception which causes a crash. That is probably the most relevant usecase since I do agree that in the best of all worlds the programmer would make the call to disconnect deliberately.

Br Eskild

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

Successfully merging this pull request may close these issues.

2 participants