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: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>