I agree we need to find some way to make up that performance, but since `RB_OBJ_SET_FROZEN_SHAREABLE` is shallow and doesn't verify that referenced objects are shareable, this seems very hard to use safely. Even in the example Trilogy PR...jhawthorn (John Hawthorn)
Set RUBY_TYPED_THREAD_SAFE_FREE on TypedData types whose dfree function is trivially safe, and only frees its own memory Types not yet marked as THREAD_SAFE_FREE: - id2ref_tbl_type: sets the process-global id2ref_tbl to NULL. - mutex_da...jhawthorn (John Hawthorn)
Applied in changeset commit:git|d44862fe2a5d68de648eccae7743899b6a5c870a. ---------- [Feature #22067] Add RUBY_TYPED_THREAD_SAFE_FREE flag Lets a TypedData type declare its dfree as thread-safe, so the GC may run it on any thread, in p...jhawthorn (John Hawthorn)
Lets a TypedData type declare its dfree as thread-safe, so the GC may run it on any thread, in parallel, and concurrently with Ruby code. Implies RUBY_TYPED_FREE_IMMEDIATELY.jhawthorn (John Hawthorn)
It was also initially a surprise to me that Fiber storage is inherited across threads as well. In my experience, inheritable Fiber storage has mostly been a mistake and cause of bugs, I don't think we should spread that to threads. ...jhawthorn (John Hawthorn)