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

Add new arity for release method #6

@tylerwilding-wk

Description

@tylerwilding-wk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions