Skip to content

Commit

Permalink
Set scheduler to ractor-safe
Browse files Browse the repository at this point in the history
  • Loading branch information
dsh0416 committed Dec 22, 2020
1 parent 0ad9462 commit 04e2580
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The Event Library that designed for Ruby 3.0 Fiber Scheduler.
| epoll | ✅ (See 2) ||||
| kqueue ||| ✅ (⚠️ See 5) ||
| IOCP || ❌ (⚠️See 3) |||
| Ruby (`select`) | ✅ Fallback | ✅ (⚠️See 4) | ✅ Fallback | ✅ Fallback |
| Ruby (`IO.select`) | ✅ Fallback | ✅ (⚠️See 4) | ✅ Fallback | ✅ Fallback |

1. when liburing is installed
2. when kernel version >= 2.6.8
Expand Down
3 changes: 3 additions & 0 deletions ext/evt/evt.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

void Init_evt_ext()
{
#ifdef HAVE_RB_EXT_RACTOR_SAFE
rb_ext_ractor_safe(true);
#endif
Evt = rb_define_module("Evt");
Scheduler = rb_define_class_under(Evt, "Scheduler", rb_cObject);
Payload = rb_define_class_under(Scheduler, "Payload", rb_cObject);
Expand Down

0 comments on commit 04e2580

Please sign in to comment.