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

Docs are incorrect for try_lock #88

Open
howardjones opened this issue Feb 6, 2022 · 2 comments
Open

Docs are incorrect for try_lock #88

howardjones opened this issue Feb 6, 2022 · 2 comments

Comments

@howardjones
Copy link

It says:

fasteners.lock.try_lock(*args, **kwds)

but in fact, it ignores any arguments apart from the lock.

def try_lock(lock):

(found while trying to set the delay/max_delay for a context manager)

@psarka
Copy link
Collaborator

psarka commented Feb 8, 2022

Thanks for the report @howardjones!

Indeed, the docs are off, but furthermore, none of the thread locks support timeouts (and consequently delay/max_delay), so you are out of luck.

@psarka
Copy link
Collaborator

psarka commented Feb 8, 2022

Actually, not out of luck :) If you need good thread locks, use this lib instead: https://github.com/elarivie/pyReaderWriterLock. I have not tried it, but it has everything I could ever wish.

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

No branches or pull requests

2 participants