rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.66k stars 193 forks source link

add pre-emption APIS #382

Closed cowboyd closed 9 years ago

cowboyd commented 9 years ago

v8 4.5 has very convenient APIs for interrupting potentially long running JavaScript code. This exposes those APIs to Ruby code so that it can place its own limits on the CPU resources consumed by V8.

Note: As a small amount of cleanup, I removed the old context helpers in the spec which were not being used any more.