There invoked on the thread you use them, with Javascript that's normally the main thread, but say with cluster with node, or web workers etc in Browser land it would run in the context you invoked them. This is because Javascript engine is by nature single threaded. But bear in mind, JS API's that are async could process that inside a worker thread, but from your POV it's not relevant.
– KeithDec 19 '18 at 13:15
https://stackoverflow.com/a/52444953/1048572, https://stackoverflow.com/q/22844441/1048572, https://stackoverflow.com/a/22254817/1048572
– BergiDec 19 '18 at 13:28