Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

context timeout restriction and 1.9 compatibility #14

merged 6 commits into from Apr 9, 2012


None yet
2 participants

kares commented Feb 15, 2012

see the commits for details and as usual let me know if something bother your eye.
especially due jruby --1.9 incompatibilities a soonish release would be fine ...


kares commented Apr 9, 2012

@cowboyd any chance we get a 1.9 compatible release soon ?


cowboyd commented Apr 9, 2012

Quick question: why not make the default restrictable?


kares commented Apr 9, 2012

the genesis of restrictable would be, if I recall correctly:

  1. don't create a factory per context by default
  2. put the restrictions into a context sub-class + add a restrictable factory since there's a timeout_limit to be added
  3. add the timeout limit as the instruction limit ain't always enough (e.g. JS code might perform some setTimeout)

basically for most every day use it did not make much sense for the restrictable code to sit around + the code seems better manageable (with the timeout limit being added) to me when separated.
than of course I retained backwards compatibility - that's probably why you ask seeing this :

  def instruction_limit=(limit)
    if restrictable?
      @native.instruction_limit = limit
      raise "setting an instruction_limit has no effect on this context, use " + 
            "Context.open(:restricted => true) to gain a restrictable instance"

cowboyd added a commit that referenced this pull request Apr 9, 2012

Merge pull request #14 from kares/master
context timeout restriction and 1.9 compatibility

@cowboyd cowboyd merged commit 0dd3f7e into cowboyd:master Apr 9, 2012


kares commented Apr 11, 2012

@cowboyd could we also get out 1.73.2 release of master please (if you do not have more plans for it) ... thanks


cowboyd commented Apr 11, 2012

Done. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment