File tree Expand file tree Collapse file tree 4 files changed +18
-67
lines changed Expand file tree Collapse file tree 4 files changed +18
-67
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ module Examples where
142
142
liftEff $ trace " Testing Par (<|>) - kill two"
143
143
test_parRaceKill2
144
144
145
- -- liftEff $ trace "Testing cancel of Par (<|>)"
146
- -- test_cancelPar
145
+ liftEff $ trace " Testing cancel of Par (<|>)"
146
+ test_cancelPar
147
147
148
148
liftEff $ trace " Done testing"
Original file line number Diff line number Diff line change @@ -318,15 +318,17 @@ module Control.Monad.Aff
318
318
var onCanceler = function(){};
319
319
320
320
canceler1 = aff(function(v) {
321
- if (!requestCancel) {
321
+ if (requestCancel) {
322
+ isCanceled = true;
323
+
324
+ return alwaysCanceler;
325
+ } else {
322
326
canceler2 = f(v)(success, error);
323
327
324
328
onCanceler(canceler2);
325
- } else {
326
- isCanceled = true;
327
- }
328
329
329
- return canceler;
330
+ return canceler2;
331
+ }
330
332
}, error);
331
333
332
334
return function(e) {
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ module Control.Monad.Aff.Par
56
56
ve <- makeVar' 0 -- the error count (starts at 0)
57
57
c1 <- forkAff $ attempt a1 >>= either (maybeKill va ve ) (putVar va )
58
58
c2 <- forkAff $ attempt a2 >>= either (maybeKill va ve ) (putVar va )
59
- (takeVar va ) `cancelWith ` (c1 <> c2 )
59
+ (takeVar va ) -- `cancelWith` (c1 <> c2)
60
60
61
61
instance plusPar :: Plus (Par e ) where
62
62
empty = Par empty
You can’t perform that action at this time.
0 commit comments