Closed austindrenski closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
1a14f6c
) 0.00% compared to head (0c7fabf
) 94.11%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I've started updating this and https://github.com/open-feature/dotnet-sdk/pull/184
Closing and continuing with https://github.com/open-feature/dotnet-sdk/pull/268
Switch to
ValueTask
on methods that are likely to complete synchronously and/or be populated with contrib-/user-provided delegates.See: #184
This follows #184 with an idea (probably best punted for post-
2.0.0
) to switch plumbing-type methods fromTask
toValueTask
to take advantage of the zero-cost-sync-completion sugar that thedotnet/runtime
folks have generously given us to play with.I've got a bigger PR planned where I'll propose returning
ValueTask<T>
on theIFeatureClient
methods in order to hide a TTL caching layer that users can use to amortize provider requests (e.g. users could configureIFeatureClient
to cache a value for flagK
forN
seconds, and for thoseN
seconds any subsequent requests to anyIFeatureClient
for flagK
would result in a sync read from a memory cache).But that's for later, and for now this PR just looks to make those user-/contrib-provided plumbing methods super lightweight on the scalding hotpath.