Unverified Commit 5207dec0 authored by Anna Henningsen's avatar Anna Henningsen
Browse files

src: allow generic C++ callables in SetImmediate()

Modify the native `SetImmediate()` functions to take generic C++
callables as arguments. This makes passing arguments to the callback
easier, and in particular, it allows passing `std::unique_ptr`s
directly, which in turn makes sure that the data they point to is
deleted if the `Environment` is torn down before the callback can run.

PR-URL: https://github.com/nodejs/node/pull/28704


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 61f3a5c6
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment