On Tue, Jul 16, 2019 at 1:43 AM Jaka Jančar <j...@kubje.org> wrote: > Hi, > > Is there any way to limit execution time to 1ms? Calling timer_create() and > RequestTermination() from another thread is ok for double-digit timeouts, but > not high resolution enough for single digit ones. Is there some callback on > isolate thread that could be used for clock_gettime()? > > Jaka
There's no such mechanism. I suppose you could blast the JS thread with `isolate->RequestInterrupt(callback, data)` calls but that would be very inefficient. Since you're already using a watchdog thread, can't you nanosleep() for approx. 997 usec and call `isolate->RequestTermination()`? If that isn't precise enough, can you elaborate on why you need that kind of resolution? Aside: if you're using timer_create() with the SIGEV_SIGNAL flag, keep in mind that `isolate->RequestTermination()` is _not_ async-signal-safe. SIGEV_THREAD or SIGEV_THREAD_ID is okay though. -- -- 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/CAHQurc-ZSB1aNRWjJE_s6FyiHZjCV%3D37ecNLefj2wWRMtNgOpQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.