spec icon indicating copy to clipboard operation
spec copied to clipboard

Unable to cleanly dispose of a provider instance

Open weyert opened this issue 2 years ago • 3 comments

The specification doesn't appear to define a way to cleanly dispose of provider instances. Some provider implementations which uses SDKs of the vendor and these SDKs might have event listeners, create watchers, or timers. These should be need to be cleanly disposed off when the client is being dismissed.

I think it would be useful to add a async shutdown-function to the client to allow shutting down and stop any potential leaky objects

weyert avatar Jun 13 '22 10:06 weyert

This should trigger when the api object dies as well as if we swap out the provider.

justinabrahms avatar Jun 14 '22 02:06 justinabrahms

:100: , couldn't agree more. This is related to https://github.com/open-feature/spec/issues/77.

This will become very important when we expose events on the OpenFeature client API. This is a major new feature for us, we decided we didn't need it for the first alpha, but we will need it soon :tm: , especially for client-side SDKs.

I'm not sure we should do this BEFORE we work on events, though.

toddbaert avatar Jun 14 '22 15:06 toddbaert

I'd like to see an OFEP for this at some point, but it's not pressing. I'm leaving this open for now.

toddbaert avatar Aug 11 '22 13:08 toddbaert

Closing in favor of the OFEP.

beeme1mr avatar Aug 22 '22 18:08 beeme1mr