
16 Jul
2014
16 Jul
'14
5:49 a.m.
On Wed, Jul 16, 2014 at 3:04 AM, Kazu Yamamoto
I looked at your code very quickly. What happens if you replace "replicateM" and "mapM_" to recursions? (Especially I don't trust replicateM in IO.)
Also, we need to confirm that atomicModifyIORef' does not really leak space.
Those functions are only executed once on start (to fork the threads, wait
for them to finish, and to update the connected clients counter
respectively), they cannot account for steady-state memory increase from
the client loop --- the loop just does write + read + threadDelay.
G
--
Gregory Collins