about summary refs log tree commit homepage
path: root/lib/rainbows/xepoll_thread_spawn/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-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_spawn/client: remove rdoc
It's an internal implementation detail.
2011-05-08epoll_wait: flags argument is unused
We only poll for one event (EPOLLIN/EPOLLOUT) at a time, so there's no need to actually check since they're too rare.
2011-05-08xepoll_thread_spawn: rework acceptor logic
Infinite sleep is too dangerous due to possible race conditions, so use worker_yield which is safer and cheaper in the general case. We can also avoid sleeping on new threads by only spawning when the client module is included.
2011-05-08xepoll_thread_spawn/client: close returns nil
Otherwise pipeline_ready can false positive on us
2011-05-08xepoll_thread_spawn: inline needless method
shorter line and 3 lines of code killed!
2011-05-06remove unnecessary variable assignments
2011-05-06ensure some requires get loaded in master
More sharing, faster startups, and most importantly, better error reporting if some things are missing.
2011-05-03add client_header_buffer_size tuning parameter
We're changing our default to 1K buffers to save memory. This should reduce memory usage of idle clients and lower pressure on the MRI GC. Rails applications using session cookies (the default) may want to up this to 2K or more.
2011-04-30xepoll_thread_spawn: lower memory usage
This one actually has a realistic chance of running hundreds/thousands of clients, and 32K per-client is a huge amount.
2011-04-29xepoll_thread_spawn: fix race condition with acceptors
Noticed under 1.8.7
2011-04-29xepoll_thread_spawn: initial implementation
Whee! This is going to be awesome.