You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
A token that is cancelled after a timeout is simple:
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 callssetTimeout
/clearTimeout
as necessary.In node, this also could be achieved by a simple
unref
call.The text was updated successfully, but these errors were encountered: