Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Add new arity for release method #6

Open
tylerwilding-wk opened this issue Jul 3, 2019 · 0 comments
Open

Add new arity for release method #6

tylerwilding-wk opened this issue Jul 3, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@tylerwilding-wk
Copy link
Contributor

When you try to dereference a ResourceHandle, it checks to ensure that the handle is still valid before returning. When it is not still valid, it throws a generic exception: "user has no handle on this resource.

A new arity for the resource release method that allows you to pass a function intended to catch and handle that exception (perhaps by suppressing or re-throwing or throwing a completely different exception) when and if this function is specified.

This would allow a possibly very low-level asynchronous task to handle the expiration of a resource handle based on logic known only to higher-level components in the system (e.g., choose to suppress the exception rather than log it because it's a "nominal" exception).

To Be Determined: details of context passed to this function.

@tylerwilding-wk tylerwilding-wk added the enhancement New feature or request label Jul 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant