igrigorik/agent — pull request #7 by nate (2012-03-03 01:57:20+00:00)
Title: Bugfix/race condition in selector

Fixes the race condition in the selector and the issue of the callback channel for the selector being full and blocking other channels.

After thinking about it a bit, it occurred to me that a channel that accepts just one message and ignores any subsequent ones, or a channel that has infinite depth for that matter, would be a significant departure from go's channels. So, I think the solution I landed on here is the least surprising one and is closest in spirit to go's policy of extreme simplicity. There's nothing clever about it at all.