STM help

John Meacham john at repetae.net
Mon Jul 4 04:36:28 EDT 2005


On Mon, Jul 04, 2005 at 12:06:11PM +0400, Bulat Ziganshin wrote:
> Hello John,
> 
> Sunday, July 03, 2005, 11:16:30 PM, you wrote:
> 
> JM> have a screen update thread, this is the only one that will make curses
> JM> calls. 
> JM> everything else communicates with the screen by modifying TVars holding
> JM> data values like so
> 
> in my own program i plan to use different approach. may it will be
> better for you too.
> 
> 1) one thread that render screen
> 2) this thread receives commands via one Channel and immediately
> executes them
> 3) other threads send commands via this Channel

Yeah, that is basically what I am doing now. it does keep all the curses
calls properly ordered, but doesn't solve the problem of creating the
appropriate sequence of commands in the first place :) 

Basically I want a 'view/model' split. the model will be a bunch of
TVars I can modify (perhaps in atomic groups) and the view will
automatically efficiently redraw and respond to the changes. 
        John

-- 
John Meacham - ⑆repetae.net⑆john⑈ 


More information about the Libraries mailing list