Abstract the promise context execution with a threadpool in JVM runtime and the event loop in JavaScript runtime