|
Home > Archive > Unix Programming > August 2006 > can i use pthreads along with curses .
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
can i use pthreads along with curses .
|
|
| Subhash 2006-08-23, 7:36 am |
| Hi all,
i am learning PTHREADS i want to be thorough in multithreaded
programming..
some were i read that " if we use Threads and Curseswith in a single
program,
it gives problm " plz explain..
Regards/-
Subhash
| |
| JH Trauntvein 2006-08-23, 1:27 pm |
|
Subhash wrote:
> Hi all,
>
> i am learning PTHREADS i want to be thorough in multithreaded
> programming..
> some were i read that " if we use Threads and Curseswith in a single
> program,
> it gives problm " plz explain..
Many libraries are not "thread safe". This means that the data and the
functions in the libraries are structured so that, if two threads are
accessing them concurrently, data corruption will result. Apparently
ncurses falls into this category as do most UI libraries. That being
said, your program can have multiple threads so long as you are careful
to do all of your ui interaction from within only one thread.
Regards,
Jon Trauntvein
|
|
|
|
|