about summary refs log tree commit homepage
path: root/lib/yahns/queue_kqueue.rb
DateCommit message (Collapse)
2018-12-08remove IO#close_on_exec= calls
Since we've required Ruby 2.0+ for a while, we can assume descriptors are created with IO#close_on_exec=true and avoid bloating our code with calls to it.
2016-11-29queue_*: fix outdated comments
These comments have been outdated since 2013 with commit cd84e2ccbdf2 ("ensure we stop all threads at exit")
2016-06-07queue_*: check for closed IO objects
Using a high max_events may mean some IO objects are closed after they're retrieved from the kernel but before our Ruby process has had a chance to get to them.
2016-01-02copyright updates for 2016
Using the 'update-copyright' script from gnulib[1]: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright We're also switching to 'GPL-3.0+' as recommended by SPDX to be consistent with our gemspec and other metadata (as opposed to the longer but equivalent "GPLv3 or later"). [1] git://git.savannah.gnu.org/gnulib.git
2016-01-02enable frozen_string_literal for Ruby 2.3+
There are likely yet-to-be-discovered bugs in here. Also, keeping explicit #freeze calls for 2.2 users, since most users have not migrated to 2.3, yet.
2015-10-13copyright updates
Future updates may use the update-copyright script in gnulib: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright
2015-05-11worker threads log LoadError and SyntaxError, too
Some applications may lazily load code during app dispatch, triggering LoadError or SyntaxError exceptions. Log the error and backtrace so application maintainers can more easily notice and diagnose problems. Keep in mind users are likely to have performance and race condition problems with lazy loading, and the process may still be in a bad state due to partially-loaded code. This commit is only intended to give application authors a chance to notice and fix or avoid problems in the future. Note: logging fatal exceptions by default in all threads was proposed in ruby-core, but currently not implemented in any released version: https://bugs.ruby-lang.org/issues/6647 Reported-by: Lin Jen-Shin (godfat) <godfat@godfat.org> <CAA2_N1umJO12XH9r+JHnA6r=z=Mwp_PqOrdnW65oqW2K2-iAoQ@mail.gmail.com>
2015-05-08proxy: ensure GC sees the client socket upon reactivation
Reactivating a client socket after the proxied response is complete requires the object remain visible to the Ruby GC while no thread is accessing it. So we must place the object back into the fdmap to prevent the GC from eating it (and having epoll return an invalid pointer).
2015-04-03proxy_pass: rewrite to be async, using rack.hijack
This allows our reverse proxy to avoid having an innefficient 1:1 relationship between threads and upstream connections, reducing memory usage when there are many upstream connections (possibly to multiple backend machines).
2015-03-17avoid EPOLL_CTL_DEL calls on rack.hijack
We will support "un-hijacking", so the repeated ep_insert/ep_remove sequences in the kernel will get expensive and complicated for our user-land code, too.
2014-04-21queue_kqueue: fixup comments from copy+paste
Much of this code was copied from the epoll queue.
2014-02-08implement kqueue and sendfile compatibility support
Tested on Debian GNU/kFreeBSD (sid): make check SENDFILE_BROKEN=1