> On Sep 4, 2022, at 1:08 PM, 'Kenton Varda' via Cap'n Proto 
> <capnproto@googlegroups.com> wrote:
> 
> - You say you can't put the promise in a TaskSet because you need to be able 
> to specifically cancel it. Could you instead use a kj::Canceler to control 
> cancellation? The canceler only wraps the promise, then you could still put 
> it in a TaskSet.

This works, thanks; and I already have a TaskSet to put it into. The only nit 
is that the TaskSet’s ErrorHandler gets called with an exception. I suppose I 
can use a separate TaskSet just for the idle timer, with an ErrorHandler whose 
taskFailed method does nothing.

This does seem like a lot of complexity just to implement a cancelable one-shot 
timer...

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capnproto+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/83AA81A6-153A-4660-ADAD-83D47706890A%40mooseyard.com.

Reply via email to