Adds the passed function to the JavaScript Message Queue to be executed by the Event Loop,
wraps a Promise around that and resolves any asynchronous values.
This allows to call a function asynchronously and on the Event Loop, which doesn't grow the call stack,
but can be used in a synchronous manner using await.
Adds the passed function to the JavaScript Message Queue to be executed by the Event Loop, wraps a Promise around that and resolves any asynchronous values. This allows to call a function asynchronously and on the Event Loop, which doesn't grow the call stack, but can be used in a synchronous manner using await.