Project

General

Profile

Actions

Feature #20053

closed

M:N Threads, now w/ macOS support (kqueue)

Added by jpcamara (JP Camara) 12 months ago. Updated 11 months ago.

Status:
Closed
Target version:
[ruby-core:115669]

Description

I have a PR here that adds support for macOS to M:N threads using kqueue: https://github.com/ruby/ruby/pull/9178

It adds in kqueue/kevent calls when present in the OS. Technically this would open up support for FreeBSD as well, but I don't have a way of testing that so i'm not sure how well it does or doesn't work there.

I wanted to get support going for macOS so more devs can try out M:N threads and test it. I do think there should be a larger discussion around the potential relationship between this and some of the awesome fiber scheduler work over the last few years (and the potential of utilizing anything from io-event?). But that can be a topic for another day - let's get macOS support in the meantime!

Disclaimer: C isn't my day-to-day language, so I could definitely use feedback there. I'm also more of a kernel event queue (kqueue, epoll, io_uring) enthusiast, but kqueue isn't something I have specific experience writing with - just lots of reading code and small toy code up until this point. So someone like @ioquatix (Samuel Williams) would probably be a good person to get eyes on it.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0