Skip to content

Canceler newtype and instances, cancellable Par implementation

Compare
Choose a tag to compare
@jdegoes jdegoes released this 14 Apr 19:12

This release adds a newtype for Canceler so that Semigroup and Monoid instances may be defined, allowing easy composition of multiple cancelers into a single canceler.

In addition, Par has been rewritten to use a new generic, exported cancelWith combinator, so that canceling a parallel computation will now cancel the individual components of the computation.

This is mostly a drop-in upgrade, but if you created your own cancelers before, you'll now need to use the newtype.