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
The when(fulfilled:…) family takes a QoS and does all of its work there. The downside here is it can't resolve synchronously even if all inputs have resolved. By contrast, when(first:cancelRemaining:) will resolve synchronously if any of the inputs have fulfilled/rejected.
Implementation note: One solution is to use .nowOr(_:) (see #34) on the interior work. We can then test the group to see if it's ready synchronously. We could also rewrite the enqueue loop to only hop on the context if it's rejecting/cancelling, because writing to resultBuffer can happen on any thread. Note that in this case we can still do the group.leave() outside of the context, as the resultBuffer entry will be nil and thus our processing of the buffer will safely abort.
The text was updated successfully, but these errors were encountered:
The
when(fulfilled:…)
family takes a QoS and does all of its work there. The downside here is it can't resolve synchronously even if all inputs have resolved. By contrast,when(first:cancelRemaining:)
will resolve synchronously if any of the inputs have fulfilled/rejected.Implementation note: One solution is to use
.nowOr(_:)
(see #34) on the interior work. We can then test the group to see if it's ready synchronously. We could also rewrite the enqueue loop to only hop on the context if it's rejecting/cancelling, because writing toresultBuffer
can happen on any thread. Note that in this case we can still do thegroup.leave()
outside of the context, as theresultBuffer
entry will benil
and thus our processing of the buffer will safely abort.The text was updated successfully, but these errors were encountered: