-
Notifications
You must be signed in to change notification settings - Fork 67
Closed
Labels
type: enhancementA new feature or addition.A new feature or addition.
Milestone
Description
The idea is something like this:
newtype Aff e a = Aff ((Error -> Eff e Unit) -> (a -> Eff e Unit) -> EffA e (Unit -> Aff e Unit)So an Aff can decide to allow canceling. The semantics would be something along the lines of:
- Calling the cancel function does not guarantee canceling.
- If the cancel function succeeds, the
Affwill error, not succeed. - Cancelations in derived
Affwould be propagated.
The main advantage is that IO can be aborted, e.g. the <|> combinator for Par can abort the other computation, which can lead to efficiency gains.
The public API would be something like:
killAff :: forall e a. Error -> Aff e a -> Aff e BooleanWhich returns a true if it's killed and a false otherwise. Or something like that.
Metadata
Metadata
Assignees
Labels
type: enhancementA new feature or addition.A new feature or addition.