I am embedding V8 in my C++ application and I have registered a custom "test" function on the global object taking a callback as parameter:
test(function() { console.log("callback"); }); The "test" function starts a new thread and executes the callback on this thread. Now I can wrap this function in a Promise: new Promise(function(resolve, reject) { test(resolve); }).then(function() { console.log("this callback is executed on the background thread created by the 'test' function"); }); I am looking for a way to somehow hook into V8 promises so that they are always resolved on the main thread of my application. I thought that using a custom platform might help but couldn't find any useful method that I can override. It does provide the "CallOnWorkerThread" method but can I relate this to promises? Does V8 provide some API to intercept and replace the promise implementation? -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/f27fc895-fb62-481c-ab0d-a9188027d4b7%40googlegroups.com.