Skip to content

Commit

Permalink
Avoid calling rb_ext_ractor_safe on 2.x Rubies
Browse files Browse the repository at this point in the history
Can you tell it's Friday?
  • Loading branch information
ivoanjo committed Feb 7, 2025
1 parent afa07de commit db67572
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/datadog_profiling_native_extension/profiling.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ static VALUE _native_safe_object_info(DDTRACE_UNUSED VALUE _self, VALUE obj);
void DDTRACE_EXPORT Init_datadog_profiling_native_extension(void) {
// The profiler still has a lot of limitations around being used in Ractors BUT for now we're choosing to take care of those
// on our side, rather than asking Ruby to block calling our APIs from Ractors.
rb_ext_ractor_safe(true);
#ifdef HAVE_RB_EXT_RACTOR_SAFE
rb_ext_ractor_safe(true);
#endif

VALUE datadog_module = rb_define_module("Datadog");
VALUE profiling_module = rb_define_module_under(datadog_module, "Profiling");
Expand Down

0 comments on commit db67572

Please sign in to comment.