You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the description of behavior of Poll produced by MonadCancel#uncancelable in its scaladoc:
/** ... * Masks can also be stacked or nested within each other. If multiple masks are active, all * masks must be undone so that cancelation can be observed. In order to completely unmask * within a multi-masked region the poll corresponding to each mask must be applied to the * effect, outermost-first. * * {{{ * * F.uncancelable { p1 => * F.uncancelable { p2 => * fa *> p2(p1(fb)) *> fc * } * } * * }}} * * The following operations are no-ops: * * 1. Polling in the wrong order * 1. Subsequent polls when applying the same poll more than once: `poll(poll(fa))` is * equivalent to `poll(fa)` * 1. Applying a poll bound to one fiber within another fiber * * @parambody * A function which takes a [[Poll]] and returns the effect that we wish to make * uncancelable.
ZIO.uninterruptibleMask as uncancelable does not satisfy this description:
In the code example, with ZIO, applying p1(fb) alone is enough to restore full interruptibility. The sentence "In order to completely unmask within a multi-masked region the poll corresponding to each mask must be applied to the effect, outermost-first." is not satisfied.
"Applying a poll bound to one fiber within another fiber is no-op" is not satisfied – restore functions produced by ZIO.uninterruptibleMask can migrate fibers and are not invalidated when used on another fiber.
The text was updated successfully, but these errors were encountered:
Given the description of behavior of
Poll
produced byMonadCancel#uncancelable
in its scaladoc:ZIO.uninterruptibleMask
asuncancelable
does not satisfy this description:p1(fb)
alone is enough to restore full interruptibility. The sentence "In order to completely unmask within a multi-masked region the poll corresponding to each mask must be applied to the effect, outermost-first." is not satisfied.The text was updated successfully, but these errors were encountered: