Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timers: introduce timers/promises #33950

Closed
wants to merge 3 commits into from
Closed

Commits on Jun 22, 2020

  1. timers: introduce timers/promises

    Move the promisified timers implementations into a new sub-module
    to avoid the need to promisify. The promisified versions now return
    the timers/promises versions.
    
    Also adds `ref` option to the promisified versions
    
    ```js
    const {
      setTimeout,
      setImmediate
    } = require('timers/promises');
    
    setTimeout(10, null, { ref: false })
      .then(console.log);
    
    setImmediate(null, { ref: false })
      .then(console.log);
    
    ```
    
    Signed-off-by: James M Snell <jasnell@gmail.com>
    jasnell committed Jun 22, 2020
    Configuration menu
    Copy the full SHA
    78edbf6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5bb0cb4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c17288d View commit details
    Browse the repository at this point in the history