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
logged_if_slow API #193
Comments
I'm not sure what you're asking - where did the The idea behind using threads is to not be affected if the current thread is blocked on a long operation... |
|
Your proposed syntax is illegal in Python 2, and would only work with using a single |
Sorry, the proposal is now valid syntax... |
Ok, seems reasonable. I prefer to have an optional |
I think the logged_if_slow API is a bit awkard. I think we should change it for v1.0.
Current API:
Problems:
*args
,**kwargs
).Proposed API:
Then the context manager can simply call
Also: are there valid reasons to use threading and events to handle the threshold rather than just storing a
time.time()
value and comparing in__exit__
? I don't know how the threading timeout works, so I'm just curious about the implementation!The text was updated successfully, but these errors were encountered: