From 0895257bbe6cf59c14e6517b9bc660b57a31b46d Mon Sep 17 00:00:00 2001 From: Mohamed Hafez Date: Wed, 18 Sep 2024 10:04:42 +0200 Subject: [PATCH] Mark as ractor-safe --- ext/nio4r/nio4r_ext.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/nio4r/nio4r_ext.c b/ext/nio4r/nio4r_ext.c index 8e49578..d2c2cb7 100644 --- a/ext/nio4r/nio4r_ext.c +++ b/ext/nio4r/nio4r_ext.c @@ -12,6 +12,10 @@ void Init_NIO_ByteBuffer(); void Init_nio4r_ext() { + #ifdef HAVE_RB_EXT_RACTOR_SAFE + rb_ext_ractor_safe(true); + #endif + ev_set_allocator(xrealloc); Init_NIO_Selector();