Is curses module thread-safe?

G

Grant Edwards

I'm working on a program that uses the curses module, and I'd like to
use multiple threads (using the threading module). Is the curses module
in the standard library usable from multile threads?

I found a discussion from about 15 years ago that indicated it wasn't
at that time. The example being discussed was that when one thread
calls a blocking getch(), the GIL isn't released and wall threads stop.
The suggesting work-around was to wrap the call to getch() with a
select() on sys.stdin. Is that still an issue?


If two threads call addstr() "simultaneously" is it handled properly?

Or do all curses calls need to be made by a single thread?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top