[Haskell-cafe] Suggestiong for inter-thread communication

Tim Docker tim at dockerz.net
Mon Jan 28 01:23:52 CET 2013

Hi Eric,

In a previous project, I chose vty over ncurses:

     - you can write your own event loop, and hence handle different 
event sources.
     - more liberal license (BSD3 versus GPL)


On 26/01/13 19:24, Erik de Castro Lopo wrote:
> Hi all,
> I am in the process of writing a Haskell program consisting of two
> threads, one for performing a calculation and one for an Ncurses UI
> (haskell-ncurses).
> The calculation thread needs to feed a stream of numbers back to the
> UI thread (about 1 value per second) and the UI needs to take input
> from the user and will pass parameter changes to the calculation
> thread using an IORef and atomicModifyIORef.
> However, I'm not sure how to hande the UI thread. The UI thread would
> normally wait for Ncurses input using getEvent, but I need advice on
> how to the the data from the calculation thread.
> Any advice or things to try?
> Cheers,
> Erik

More information about the Haskell-Cafe mailing list