LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   ncurses and threads (https://www.linuxquestions.org/questions/programming-9/ncurses-and-threads-575209/)

ilnli 08-06-2007 06:01 PM

ncurses and threads
 
Can anyone help me that how can I use threads and ncurses in the following scenario.

I want to screens in one screen the user will input the data and in other screen the output will be updated so I don't want that when a user inputs the data the output screen pause and wait for user input.

so can you guys provide a an example code for this.


thanks alot

wjevans_7d1@yahoo.co 08-06-2007 07:46 PM

ncurses is not thread safe. Sorry.

ilnli 08-06-2007 07:48 PM

then is there any other way out?

wjevans_7d1@yahoo.co 08-06-2007 08:32 PM

Yes. Don't use ncurses with threads. Figure out another way to do the job.

wjevans_7d1@yahoo.co 08-06-2007 08:59 PM

Or, to put it another way:

Many people assume that they need to use threads, when they don't.

Why do you want to use threads here?

ilnli 08-07-2007 05:47 PM

I need to use threads cause,

I have a variable which needs to be update and displayed every second, and simultaneously I need to get input from the user. So what will you suggest in this scenario.

regards,
Imran

wjevans_7d1@yahoo.co 08-09-2007 01:34 AM

Use the SIGALRM signal.


All times are GMT -5. The time now is 08:13 AM.