bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-threaded output


From: Steven Seeger
Subject: Re: Multi-threaded output
Date: Wed, 27 Oct 2004 13:23:07 -0700
User-agent: Microsoft-Entourage/11.0.0.040405

Hi Rob. I didn't have to modify curses, but I am still hoping to get an
answer to my question about using wgetch() from another thread. I ended up
having to call that from the original thread and using select() to wait on
stdin.

My problem was that while other threads were writing to a screen (via a
mutex protected ncurses), the wgetch() method would corrupt it. I was
calling wgetch() without the mutex thinking it woudln't update the screen,
but it can. It can call refresh depending on the state of the window.

So yes, use a mutex on everything!

Steve





reply via email to

[Prev in Thread] Current Thread [Next in Thread]