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

Locking approach suggestions for multiple cli instances #141

Open
datadavev opened this issue Sep 23, 2024 · 1 comment
Open

Locking approach suggestions for multiple cli instances #141

datadavev opened this issue Sep 23, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@datadavev
Copy link
Member

  1. The locking approach used in hashstore appears to support in process threading but not multi-process or multi-application locking. The portalocker library provides a cross platform solution for locking that works with multiple application instances and (when using redis), multi-system locking.

  2. The approach of having a single lock per instance and a class variable of locked PIDs seems ok for a single instance, but would likely be problematic with multiple processes or instances. Perhaps using portalocker the PID could be used to derive the filename of the desired lock?

@datadavev datadavev added the enhancement New feature or request label Sep 23, 2024
@doulikecookiedough
Copy link
Contributor

doulikecookiedough commented Sep 23, 2024

Thank you for your suggestion, reviewing hashstore and providing feedback @datadavev! I really appreciate it and will investigate the portalocker library (and implement the suggestions in your other enhancement tickets).

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

No branches or pull requests

2 participants