← Graph

Bouncing Select

concept 2 connections

Technique David Halasz devised for writing a non-blocking bidirectional socket proxy on top of IO.select. Sockets ready for read/write are removed from the IO.select arrays after each iteration and only 'bounced back' once a transmission actually happens. Prevents the spin-lock where a socket is read-ready but its paired socket is not write-ready, which would otherwise burn 100% CPU in IO.select. Later ported to epoll using EPOLLONESHOT, which performs the removal automatically.

category
pattern
about
Bouncing Select concept
Speaker's own technique for avoiding spin-lock in bidirectional proxies
Describes the bouncing-select technique

Provenance

Read by
6 extractions