Currently cancellation callbacks from subscribe, subscribeOrCall, finally and trifurcate are called synchronously from cancel(โฆ). They should not.
This was done to a) immediately cancel involved promises and actions (not just by .requested) and b) create and flatten the array of feedback promises from the appropriate sources. See bergus/promise-cancellation#7 and bergus/promise-cancellation#9.
In many situations, a long-lived cancellation token (passed in by the caller) is combined with a short-lived token, e.g. in the "last" example or for a timeout:
However, this keeps the setTimeout active even when the token is no longer needed and all promises that might be cancelled by it are already resolved. This could keep a process alive even when there's nothing to do any more.
Implement a TimeoutToken that does not need any resources while nobody is listening, i.e. simply stores the end time and calls setTimeout/clearTimeout as necessary.
In node, this also could be achieved by a simple unref call.