[Haskell-cafe] Question about concurrency, threads and GC

Alexander V Vershilov alexander.vershilov at gmail.com
Mon Mar 5 18:50:46 CET 2012


I've also written simple chat server based on conduits and stm channels


it has quite similar aproach and maybe this solution can be used together
to have better results.

Alexander Vershilov

Sat, Mar 03, 2012 at 02:05:17AM -0500, Joey Adams wrote
> On Fri, Mar 2, 2012 at 7:34 PM, Joey Adams <joeyadams3.14159 at gmail.com> wrote:
> > I'll try to put together a simple chat server example, like the one I
> > wrote for stm-channelize.
> Here it is:
>     https://github.com/joeyadams/haskell-chat-server-example
> See, in particular, the serveLoop function.  When a message is
> received from the client, it is written to the send channel of every
> other client.  When a message is written on the client's own send
> channel, it is transmitted to the client.  The primary thread for the
> client waits until one of the worker threads signals completion, then
> kills both of the worker threads.
> I hope this example gives you some ideas.
> -Joey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120305/bef14919/attachment.pgp>

More information about the Haskell-Cafe mailing list