Block on recv instead of loop/polling in MultiSession user/berick/multises-poll-wait-repair
authorBill Erickson <berick@esilibrary.com>
Thu, 31 Jan 2013 20:05:53 +0000 (15:05 -0500)
committerBill Erickson <berick@esilibrary.com>
Thu, 31 Jan 2013 20:08:44 +0000 (15:08 -0500)
commite6339f4ea1fddd05bb1b6376aaaed403184c3c43
treec7f12e1db3b0275d62b09c4cd7ddcd70dd85b1e5
parentf086d4c0aaaa605139aa18658a62fa919294cdc8
Block on recv instead of loop/polling in MultiSession

When the time comes to wait for responses to arrive, block on the XMPP
socket (which uses select() under the covers) until data arrives,
instead of looping furiously and calling receive in non-blocking mode.
Before this change, waiting on responses resulted in long-running CPU
spikes.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
src/perl/lib/OpenSRF/MultiSession.pm