On Sat, Apr 2, 2011 at 11:16 AM, Yves Parès <limestr...@gmail.com> wrote: > Given that haskell threads are lightweight, is it reasonable to lauch a > thread per agent and then implement fetch and send through Chans? > It will be simple to implement and to use, but if I have, say, two hundreds > of really dumb (sorry, reactive ^^) agents, like ants, I will have to launch > as many threads.
I don't see any problems with this approach if you have only hundreds of agents, especially because GHC 7 is a lot faster when using many threads. However, if you want hundreds of thousands of agents, maybe this won't work, but I don't really know what kinds of limits GHC has 8-). That said, it may be difficult to do better than GHC's scheduler ;-). Cheers! =) -- Felipe. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe