Repository navigation
Cancellable - #785
Cancellable#785
Conversation
bd1988f to
cb77bf1
Compare
|
The concept makes sense, but it would be nice to give this a clearer name since it doesn't make a promise cancelable. Rather it wraps a promise in a new, cancelable promise. Maybe |
|
@hcarty I agree that the name is not really good as is. The type of the function hints that it wraps the promise (rather than modify the promise in place) but the name should also hint at it. I like Anyway, I'll rename it to something like |
727e06d to
a56c2a2
Compare
a56c2a2 to
79ba76a
Compare
|
So I actually made it point to the right test (thanks for spotting the error) and there's a bunch of failures where tests raise |
|
I think, in the worst case, you should be able to define the function using higher-level helpers like |
|
I implemented it with It doesn't fit with the |
|
Thanks! |
Fixes #782
This PR provides a new
cancelable : 'a t -> 'a tfunction such thatcancelable pis a promisep'that is cancelable even ifpisn't.I introduced a new constructor in
how_to_cancel. I'm not 100% sure it is necessary but I couldn't find a way to do without it.