-
Notifications
You must be signed in to change notification settings - Fork 3
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
Handle exceptions and preserve function type. #11
Conversation
6cc9511
to
c65517d
Compare
We add explicit exception handling, and the decorated function now will look like the original function to inspect (for example, an async function will have inspect.iscoroutinefunction evaluate to True. This makes significant progress towards DelfinaCare#12.
128d6db
to
6462ca7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is essentially a new language to me, I feel severely under-qualified to review this, but I do have questions!
:P Matt and I thought you'd find this interesting! He will review it too, don't worry. |
I do! Thanks for tagging me in the review! I'm sure I will have more follow ups the more I study coroutines 😁 |
It now re-uses the logic we have already implemented in _OnceBase to avoid re-inventing the wheel.
Trying to release the lock during function execution was not worth the increased complexity, because subsequent calls would be blocked anyways on waiting for execution, so they may as well be blocked by the lock.
The new code is simple enough that we can have _callable directly create self-contained functions without it getting too long.
Also, add documentation for iterator behavior.
This lets us ensure parallel function test calls execute in parallel.
We add explicit exception handling, and the decorated function now will look like the original function to inspect (for example, an async function will have inspect.iscoroutinefunction evaluate to True.