Skip to content

RFC: add uncancelable Ref#flatModify and flatModifyFull(poll => ...) #3370

@armanbilge

Description

@armanbilge

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions