diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-10-31 04:49:22 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-10-31 04:49:22 +0000 |
commit | bfe699496ced8f73f659da0f0857fda614fb40b6 (patch) | |
tree | cc10c8afcdc4d3baab142a4b5181b7c9ae75087e /lib/yahns/config.rb | |
parent | b4e8651a50733f256c065e576c2d9198c3911532 (diff) | |
download | yahns-bfe699496ced8f73f659da0f0857fda614fb40b6.tar.gz |
With a GVL-free Ruby implementation, the following situation may occur as FDs are recycled frequently with 3 threads running: expiry | normal | acceptor -----------------------+-----------+---------------------- yahns_expire(fd).enter | | | close(fd) | | | accept().return => fd shutdown(fd) - WRONG | | -----------------------+-----------+---------------------- So we must prevent expiry from running while another thread is closing, otherwise there is a small chance a lack of lock inside the Ruby implementation itself can lead to a mis-issued close() to a fast-recycled FD.
Diffstat (limited to 'lib/yahns/config.rb')
0 files changed, 0 insertions, 0 deletions