[#104307] Float truncate — Eustáquio Rangel <eustaquiorangel@...>
Hi!
4 messages
2021/06/16
[ruby-core:104297] Re: [Ruby master Bug#17664] Behavior of sockets changed in Ruby 3.0 to non-blocking
From:
Eric Wong <normalperson@...>
Date:
2021-06-16 00:54:41 UTC
List:
ruby-core #104297
samuel@oriontransfer.net wrote: > I welcome discussion on this point, but for certain, I believe > Ruby being non-blocking by default makes sense and that > approach was proposed by Eric, and I agreed with it and > finally enabled it in Ruby 3. Since there is no outwardly > visible change to behaviour, I didn't think it's a big > problem, but I also noticed that Eric forced Unicorn IO back > to blocking by default, so it might be nice to have is input > too. Yes, I proposed non-blocking originally; but gave up the proposal because of potential incompatibilities (e.g. this one). I've mostly given up on Ruby (and coding in general), so the change to non-blocking happened anyways... Anyways, unicorn doesn't benefit at all from non-blocking socket I/O since it only handles one fast client at-a-time. In unicorn, blocking I/O results in fewer syscalls since there's no intermediate calls to poll/ppoll/select/etc. Non-blocking I/O only makes sense for slow clients (and unicorn could never and will never be capable of handling slow clients). Anyways, I haven't familiarized myself with io_uring, yet; but maybe I'll get around it (just not for Ruby :P) if I still have electricity in a few months time... Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>