How do all the languages implements asynchronous callbacks?

For example in C++, one need to have a "monitor thread" to start a `std::async`. If it is started in main thread, it has to wait for the callback.

```
std::thread t{[]{std::async(callback_function).get();}}.detach();

```

v.s.

```
std::async(callback_function).get(); //Main thread will have to wait

```

What about asynchronous callbacks in JavaScript? In JS callbacks are massively used... How does V8 implement them? Does V8 create a lot of threads to listen on them and execute callback when it gets message? Or does it use one thread to listen on all the callbacks and keep refreshing?

For example,

```
setInterval(function(){},1000);
setInterval(function(){},2000);

```

Does V8 create 2 threads and monitor each callback state, or it has a pool thing to monitor all the callbacks?