diff options
Diffstat (limited to 'ractor.h')
-rw-r--r-- | ractor.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -205,7 +205,15 @@ rb_ractor_thread_switch(rb_ractor_t *cr, rb_thread_t *th) static inline void rb_ractor_set_current_ec(rb_ractor_t *cr, rb_execution_context_t *ec) { +#ifdef RB_THREAD_LOCAL_SPECIFIER + #if __APPLE__ + rb_current_ec_set(ec); + #else + ruby_current_ec = ec; + #endif +#else native_tls_set(ruby_current_ec_key, ec); +#endif if (cr->threads.running_ec != ec) { if (0) fprintf(stderr, "rb_ractor_set_current_ec ec:%p->%p\n", |