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.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines