We added Ref#flatModify in #3273. But then after concerns about its uncancelability semantics in #3306, we ended up removing it in #3311.
Personally, I think flatModify is a useful combinator to have, particularly when it is uncancelable. It's just too easy to forget e.g.
https://github.com/typelevel/fs2/blob/6318ca2673c98c522e7d092ed6ea447f1ac2175a/core/shared/src/main/scala/fs2/concurrent/Signal.scala#L256
Similar to how the acquire phase in Resource.make is uncancelable (and we offer the makeFull variant with poll) I would be in favor of adding uncancelable flatModify and flatModifyFull.
We added
Ref#flatModifyin #3273. But then after concerns about its uncancelability semantics in #3306, we ended up removing it in #3311.Personally, I think
flatModifyis a useful combinator to have, particularly when it is uncancelable. It's just too easy to forget e.g.https://github.com/typelevel/fs2/blob/6318ca2673c98c522e7d092ed6ea447f1ac2175a/core/shared/src/main/scala/fs2/concurrent/Signal.scala#L256
Similar to how the
acquirephase inResource.makeis uncancelable (and we offer themakeFullvariant withpoll) I would be in favor of adding uncancelableflatModifyandflatModifyFull.