STM seems to be too slow.

...Or rather, I'm using it incorrectly. I think it would be better to
use MVar instead.