Skip to content

Commit 1d2dfde

Browse files
committed
fixes #17
1 parent 5d50182 commit 1d2dfde

File tree

4 files changed

+211
-64
lines changed

4 files changed

+211
-64
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,13 @@ canceled <- canceler `cancel` (error "Just had to cancel")
171171
_ <- liftEff $ if canceled then (trace "Canceled") else (trace "Not Canceled")
172172
```
173173

174+
If you want to run a custom canceler if some other asynchronous computation is
175+
cancelled, you can use the `cancelWith` combinator:
176+
177+
```purescript
178+
otherAff `cancelWith` myCanceler
179+
```
180+
174181
## AVars
175182

176183
The `Control.Monad.Aff.AVar` module contains asynchronous variables, which are very similar to Haskell's `MVar` construct. These can be used as low-level building blocks for asynchronous programs.

0 commit comments

Comments
 (0)