3 ms·
Not really. Naively doing something like that will kill performance, not to mention that you have to be really careful not to mess up inserting setTimeout calls
by rachitnigam 9y ago
Not really. Naively doing something like that will kill performance, not to mention that you have to be really careful not to mess up inserting setTimeout calls.
Stopify reifies the runtime stack and occasionally yields to the browser through a setTimeout call. Once the yields back control, it can restore the stack and resume computation.