Skip to content
New issue

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

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

Already on GitHub? # to your account

Implement mutex lock for the SendAPIRequest() method to avoid multiprocessing issues #92

Closed
Tim55667757 opened this issue Nov 24, 2022 · 2 comments
Assignees
Labels
Task A small task or improvements
Milestone

Comments

@Tim55667757
Copy link
Owner

Tim55667757 commented Nov 24, 2022

@Tim55667757 Tim55667757 added the Task A small task or improvements label Nov 24, 2022
@Tim55667757 Tim55667757 self-assigned this Nov 24, 2022
@Tim55667757 Tim55667757 added this to the release-1.6 milestone Nov 24, 2022
@Tim55667757
Copy link
Owner Author

from multiprocessing import cpu_count, Lock
...
self.__lock = Lock()  # initialize multiprocessing mutex lock
...
with self.__lock:  # acquire the mutex lock
...

@Tim55667757
Copy link
Owner Author

Implemented since v1.6.dev121 builds

Debug build: https://app.travis-ci.com/github/Tim55667757/TKSBrokerAPI/builds/258170093
Debug PyPI artefact: https://pypi.org/project/tksbrokerapi/1.6.dev121/

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Task A small task or improvements
Projects
None yet
Development

No branches or pull requests

1 participant