summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-09 09:58:07 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-09 09:58:07 +0000
commit510cd06c78a7a2e24b30468d54d675577083c5ad (patch)
tree29f7ccc04cc36acd612f395800b09ba933514a82 /vm.c
parent82de3b95c4c0bcd3f8ba0bac6f0dec81c787a067 (diff)
mjit.c: add :wait option to RubyVM::MJIT.pause
and wait until JIT queue is flushed when wait option is not passed or `wait: true` is passed. vm.c: ditto test/ruby/test_rubyvm_mjit.rb: added test for pause/resume test/lib/jit_support.rb: allow retrying MJIT on JITSupport level test/ruby/test_jit.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index c67ace1..711c2b8 100644
--- a/vm.c
+++ b/vm.c
@@ -2770,7 +2770,7 @@ mjit_enabled_p(void)
return mjit_enabled ? Qtrue : Qfalse;
}
-extern VALUE mjit_pause(void);
+extern VALUE mjit_pause(int argc, VALUE *argv, VALUE recv);
extern VALUE mjit_resume(void);
extern VALUE *rb_gc_stack_start;
@@ -2861,7 +2861,7 @@ Init_VM(void)
/* RubyVM::MJIT */
mjit = rb_define_module_under(rb_cRubyVM, "MJIT");
rb_define_singleton_method(mjit, "enabled?", mjit_enabled_p, 0);
- rb_define_singleton_method(mjit, "pause", mjit_pause, 0);
+ rb_define_singleton_method(mjit, "pause", mjit_pause, -1);
rb_define_singleton_method(mjit, "resume", mjit_resume, 0);
/*