Date | Commit message (Collapse) |
|
Ruby trunk started warning about more mismatched indentations
starting around r62836.
|
|
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.
|
|
The timeout (mis)feature in unicorn uses the monotonic clock
if available. We must follow suit to avoid having our timeout
functionality completely broken.
|
|
No need to specify both flags for epoll (confirmed by reading
fs/eventpoll.c in the Linux kernel).
|
|
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
|
|
It's easier-to-use in some cases.
|
|
In concurrency models long keepalive times are cheap (and thus
more likely to be used), this allows Rainbows! to gracefully
shut down more quickly.
|
|
Just close the epoll descriptor, since the sleepy_penguin
epoll_wait wrapper may not return EINTR in the future.
|
|
There's actually no reason we can't have these methods
in Rainbows::Configurator where it's easier to document
nowadays.
|
|
It's an internal implementation detail.
|
|
We only poll for one event (EPOLLIN/EPOLLOUT) at a time,
so there's no need to actually check since they're too
rare.
|
|
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.
|
|
Otherwise pipeline_ready can false positive on us
|
|
shorter line and 3 lines of code killed!
|
|
|
|
More sharing, faster startups, and most importantly,
better error reporting if some things are missing.
|
|
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.
|
|
This one actually has a realistic chance of running
hundreds/thousands of clients, and 32K per-client is
a huge amount.
|
|
Noticed under 1.8.7
|
|
Whee! This is going to be awesome.
|