sionescu/iolib — pull request #4 by esessoms (2012-07-27 12:07:56+00:00)
Title: bugfix for cascading timeouts in event loop

Timeouts weren't getting cleaned up. Use case:

(loop (event-dispatch event-loop :one-shot t :timeout whatever))

event-dispatch gets called once, creates timeout A. FD event occurs, leaving A active. Call again to create timeout B, then timeout A fires leaving B. Call again to create C, B fires... Basically, accumulates a chain of unwanted timeouts for every actual socket event leading to 100% CPU utilization pretty quickly.

Patch tries to address this.