in InterProcessLock, __init__ should be able to set default values arguments for acquire()
See original GitHub issueThis would make its use as a context manager more flexible, eg with InterProcessLock(afile, delay=0.1, max_delay=1) as locked:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9
Top Results From Across the Web
Default parameters - JavaScript - MDN Web Docs
Default function parameters allow named parameters to be initialized with default values if no value or undefined is passed.
Read more >super().__init__(...) and default values - Stack Overflow
When a parent and child class both define the same initialization parameter, but with default values, what's the best way to get sane...
Read more >Default arguments - cppreference.com
For a member function of a non-template class, the default arguments are allowed on the out-of-class definition, and are combined with the default...
Read more >Index (Curator Recipes 2.7.0 API) - javadoc.io
InterProcessLock : Acquire the mutex - blocks until it's available or the given ... DistributedAtomicNumber: Atomically sets the value to the given updated ......
Read more >Default arguments in Python - GeeksforGeeks
Default values indicate that the function argument will take that value if no argument value is passed during the function call.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And I have tested this at scale on ~ 20K runs and it looks fine so far! Thanks
This feature is definitely on the list, but I currently I don’t like the API options for it 😦
I’ll note that while I’m stuck, the exception raising one is very easy to make yourselves on top of lock by just adding the method. Like this: