Reinstate the new signal handling; revert the revert.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 20 Apr 2013 00:19:22 +0000 (02:19 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 20 Apr 2013 00:19:22 +0000 (02:19 +0200)
commit0cb56be70f7ca4f4564eea892a99d20032359a1d
treefcd2a5f33539f1396547161d5f29f96a5dac30b7
parent71fc5575037bead8b6e927a1fffd199e4fc4514b
Reinstate the new signal handling; revert the revert.

The fix for high CPU usage was not doing wakeup() all the time for
new data; not only can seemingly sending the signal be expensive,
but we sent it while still holding the mutex the awakening thread
needed, so it was extra-bad.

We're seemingly down to a reasonable amount of CPU usage again now,
but still with good non-racing semantics.
13 files changed:
acceptor.cpp
accesslog.cpp
httpinput.cpp
main.cpp
server.cpp
serverpool.cpp
stats.cpp
stream.cpp
thread.cpp
thread.h
udpinput.cpp
util.cpp
util.h