timonkrebs / MemoizR

Declarative Structured Concurrency for C#
Apache License 2.0
106 stars 3 forks source link

refactor: use ValueTask in cached scenarios #35

Closed linkdotnet closed 5 months ago

linkdotnet commented 6 months ago

The Pull Request adds optimization in scenarios where the cache is hit, and the value doesn't have to be evaluated, leading to a smaller footprint and an overall more expressive API.

timonkrebs commented 6 months ago

Thank you for the contribution.

I do not want to expose Value Task in any way from this lib. As Signals should be able to be read multiple times.

But at the moment I do not see why Stale would be exposed in the Future. Therefor LGTM.

I still would like to think about introducing Value Task a bit more.

linkdotnet commented 6 months ago

It’s absolutely fine to keep the PR around without merging and tacking it later one