Atom: add method to run computation on inner value (atomic)? #958
StefanBertels
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
If there are side-effects within an atom's Atomic reads are always possible using |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use this extension method to run a computation on the
Atomcontent in an atomic way:I call this like
myAtom.Eval(_ => _.GetCurrentData()).My use case is a
Twhich represents a ressource that isn't thread-safe (e.g. an OS handle -- might be closed on another thread => lock necessary).Ris a value object.Question: Is this extension a "missing" feature in LanguageExt or is it maybe just a bad idea at all?
Beta Was this translation helpful? Give feedback.
All reactions