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

Use thread-safe timeout-decorator #49

Closed
wants to merge 1 commit into from

Conversation

x-way
Copy link

@x-way x-way commented Nov 5, 2019

When using the checkdmarc module not in the main thread, the (default) implementation of timeout-decorator using signals does not work and fails with an exception.

This change uses the multiprocessing capable implementation of timeout-decorator, so that the checkdmarc module can also be used outside the main thread.

See https://pypi.org/project/timeout-decorator/#multithreading

@seanthegeek
Copy link
Contributor

Unfortunately, I cannot accept this change, because it would break Windows support.

Make sure that in case of multiprocessing strategy for timeout, your function does not return objects which cannot be pickled, otherwise it will fail at marshalling it between master and child processes.

uqfoundation/dill#308

bitranox/wrapt_timeout_decorator#10

@seanthegeek seanthegeek closed this Nov 5, 2019
@MrKragh
Copy link

MrKragh commented Jan 3, 2024

This is now some years ago. Do you know if this still is an issue on Windows?
I'm currently using this on an Azure Function App that are failing due to being threaded. Have forked it for now, but would love to find a solution making me able to follow this project. Thanks!

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.

3 participants