Hi, all ! i remember that we can not run JS code in v8::RequestInterrupt, But i find i can run JS code by posting a `Runtime.evaluate` command to V8 in v8::RequestInterrupt. My test is as follows (v8::RequestInterrupt is used by session.connectToMainThread() to post a message to v8). ``` const { Worker, isMainThread } = require('worker_threads'); if (isMainThread) { new Worker(__filename); while(1) {} } else { const inspector = require('inspector'); const fs = require('fs'); const session = new inspector.Session(); session.connectToMainThread(); // post a message to main thread session.post('Runtime.evaluate', { includeCommandLineAPI: true, expression: 'process.pid', }, (err, result) => { fs.writeFileSync('1.txt', JSON.stringify(err || result)); }); } ``` So i wonder if we can run JS code by posting a `Runtime.evaluate` command to V8 in v8::RequestInterrupt ?
-- -- 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/e4afa71c-c65f-47ca-be72-dd83c77812ban%40googlegroups.com.