
24 Apr
2015
24 Apr
'15
9:39 a.m.
In fact I think we can already deduce the answer from the implementation of `poll`:
http://hackage.haskell.org/package/zeromq4-haskell-0.6.3/docs/src/System-ZMQ...
The key point is that the [Poll s m] list is `mapM`ed over. Each handler is checked for a match and then fired or not fired before the next handler is checked for a match. This means that if you call `pollSockets` in a handler you are leaking the space associated with the unprocessed entries.
I should have checked the code. Unfortunately the idea to use a recursive call to pollSockets comes from the Haskell examples in the ZeroMQ guide. So I will probably not be the only one that has this issue... Kind regards, Martijn Rijkeboer