Hey there, I think you may want to give v8::V8::TerminateExecution() a shot. It throws an uncatchable exception in your JavaScript code.
I think Cloudflare workers terminated the execution after 30 seconds. However, I'm not sure if all Promises run in the same execution context in your Isolate. Talking about embedding V8 and running untrusted code, take a look at the security risks, as V8 does not provide perfect sandboxing / security capabilities in an embedded environment (Feel free to correct me if I'm wrong here) https://developers.cloudflare.com/workers/learning/security-model Cheers! On Mon 8. Feb 2021 at 23:34, bambam <ehtrezem...@gmail.com> wrote: > Hello guys... I'm embedding the V8 into my own application to run some > untrusted code concurrently. Every untrusted code is executed inside a > promise and when any of these codes blocks the system (by doing a > while(true){} for example) I need to stop it. So, I've been trying to find > a way of canceling JS promises but I haven't found anything useful. Does > anyone here know where I could find some related information? > > -- > -- > 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/fb3a5a6f-3b49-4516-a037-4aa19a2bceb2n%40googlegroups.com > <https://groups.google.com/d/msgid/v8-users/fb3a5a6f-3b49-4516-a037-4aa19a2bceb2n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- *Robin Röper* Predigerberg 16 86150 Augsburg Tel.: 0176 21400280 Tel. (work): 0821 79500234 -- -- 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/CAHqbMwgEzwTGAN%3DZv_8U4oTX%2Bkx__1mPfK59kg4Axov5mjjnLw%40mail.gmail.com.