cybozu/yrmcds — pull request #15 by ymmt2005 (2013-11-27 17:31:43+00:00)
Title: Reduce the reactor thread's load by dispatching send jobs to workers

The scalability of yrmcds is limited by the reactor thread's high CPU usage.

This pull request moves a reactor's job to send pending data to worker threads
to improve the scalability.

The first commit changes `cybozu::resource::m_lock` usage to guard only the valid flag.
To guard pending data buffers used in `cybozu::tcp_socket`, a new mutex is introduced.

The second commit just implements `yrmcds::memcache_socket::on_writable` to
dispatch send jobs to idle workers.