async/delay DelayOptions should take an unref boolean
See original GitHub issueWith the new Deno.unrefTimer
support in Deno v1.17, the DelayOptions
interface for async/delay.ts
should support a new boolean
field unref
When unref
is set to true
, the id of the internal setTimeout
should be automatically unreffed with Deno.unrefTimer(i)
Thus a call like this:
await delay(1000, {unref : true});
wouldn’t prevent Deno from exiting.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Timers | Node.js v19.3.0 Documentation
Calling immediate.unref() multiple times will have no effect. ... ref <boolean> Set to false to indicate that the scheduled Timeout should not require...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kt3k, I believe this issue can be closed.
@iuioiua
Right, let’s check Deno namespace and keep the browser compatibility.