about summary refs log tree commit homepage
path: root/lib/rainbows/xepoll_thread_pool/client.rb
DateCommit message (Collapse)
2019-01-02quiet mismatched indentation warnings
Ruby trunk started warning about more mismatched indentations starting around r62836.
2015-11-21Ruby 1.9.3+-only cleanups
unicorn 5 will only support Ruby 1.9.3 and later, so remove some checks for Hash#compare_by_identity and IO.copy_stream which we know exist in Ruby 1.9. Favor &:sym proc dispatch to avoid unnecessary captures and bytecode size increases, too. Finally, ensure we fail fast by converting some literal hashes to use non-arrow syntax for symbolic keys.
2015-11-21bump to unicorn 5.0.1, use monotonic clock
The timeout (mis)feature in unicorn uses the monotonic clock if available. We must follow suit to avoid having our timeout functionality completely broken.
2013-02-26xepoll_thread_*/client: EPOLLONESHOT implies EPOLLET
No need to specify both flags for epoll (confirmed by reading fs/eventpoll.c in the Linux kernel).
2012-07-01coolio+xepoll_thread*: use shutdown() for keepalive timeout
Triggering Errno::EBADF is tricky in multithreaded situations due to possible race conditions and yet-to-be discovered bugs. shutdown(2) is also safe against apps the fork() internally but do not execve(2) nor set FD_CLOEXEC. n.b. calling fork() after pthreads are spawned may not be safe on all platforms w.r.t. malloc, but /is/ the case for glibc on GNU/Linux. Follow-up-to: commit a5b987619f4b793203f6a50e424fe98c5b0794ba
2011-06-10use HttpParser#add_parse API in Unicorn 3.7.0
It's easier-to-use in some cases.
2011-05-21xepoll_thread_pool/client: improve autopush support
We need to trigger a recv() to uncork the response. This won't affect fairness (much) since all recv()s are non-blocking and a successful header parse will put us in the back of the queue.
2011-05-20coolio* + *epoll*: drop keepalive clients on SIGQUIT
In concurrency models long keepalive times are cheap (and thus more likely to be used), this allows Rainbows! to gracefully shut down more quickly.
2011-05-16more reliable shutdown for epoll concurrency models
Just close the epoll descriptor, since the sleepy_penguin epoll_wait wrapper may not return EINTR in the future.
2011-05-10configurator: move validation logic over
There's actually no reason we can't have these methods in Rainbows::Configurator where it's easier to document nowadays.
2011-05-09xepoll_thread_pool: add optional :pool_size argument
We're now able to configure the number of threads independently of worker_connections.
2011-05-09add XEpollThreadPool concurrency option
This is probably friendlier on server resources in the worst case than XEpollThreadSpawn but may perform worse in the client client-visible way, too.