From: Eric Wong Date: 2018-04-30T10:47:01+00:00 Subject: [ruby-core:86775] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid samuel@oriontransfer.org wrote: > If you use any kind of thread-safe shared mutable state (e.g. > a queue), you will invoke some kind of IPC (syscall) overhead. There's unavoidable locking costs we're always paying inside the kernel for every epoll_ctl/epoll_wait/kevent syscall. > If you don't need to communicate between threads, you can > avoid all IPC, e.g. > https://github.com/socketry/async/blob/master/lib/async/queue.rb > doesn't directly invoke any kind of IPC/syscall in order to > function. Since we're paying the locking cost inside the kernel, we won't need to pay that cost in userspace (with one-shot). So we might as well take advantage of the fact we're getting "free" thread-safety from the kernel... Unsubscribe: