Benoit Daloze
Benoit Daloze
> No. If your array is read-only you should use a @CompilationFinal(dimensions=1) Object[] array in context or language. But then you need both this wrapper if the index is not...
@chrisseaton will look if he can avoid the `if (rope == null) {` (e.g., with a boolean var or starting with an empty Rope) in this specific case and report...
I was thinking the main place where we take the lock is `rb_define_method` and friends, and those we can simply read from a thread-local when defining functions to know whether...
Given https://bugs.ruby-lang.org/issues/17307#note-21 The way to mark C extensions as thread-safe should be: ```c rb_define_method(mod, "need C ext lock", func1, 0); #ifdef HAVE_RB_EXT_THREAD_SAFE rb_ext_thread_safe(true); #endif rb_define_method(mod, "does not need C ext...
@ioquatix says a way to define it explicitly per method would be nice, like: ```c rb_define_method(mod, "does not need C ext lock and can run in parallel", func2, RB_NO_EXT_LOCK(arity)); ```...
BTW I found that a :class TracePoint is also used in `bundler/spec/runtime/setup_spec.rb:891: TracePoint.trace(:class) do |tp|` And we found that using instrumentation for TracePoint is very heavy on memory footprint, so...
Thanks a lot for the report. This is an area where the semantics of CRuby seems unclear, e.g. does it make other threads wait until the end of `module M`...
BTW to improve the reliability of that test I believe you would need a sleep (smaller, e.g. of 0.1) between the Thread.new and `assert M.works?`, otherwise it's likely the M.works?...
That looks accurate, I'll try to fix this issue soon.
Some more details about how CRuby handles this: https://github.com/ruby/ruby/pull/5788 And: (from @ioquatix) > No, it's literally cached, there is an autoload cache > Instead of setting the constant on the...