Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #59884 > unrolled thread

Is curses module thread-safe?

Started byGrant Edwards <invalid@invalid.invalid>
First post2013-11-18 16:38 +0000
Last post2013-11-18 16:38 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Is curses module thread-safe? Grant Edwards <invalid@invalid.invalid> - 2013-11-18 16:38 +0000

#59884 — Is curses module thread-safe?

FromGrant Edwards <invalid@invalid.invalid>
Date2013-11-18 16:38 +0000
SubjectIs curses module thread-safe?
Message-ID<l6dfpe$kh3$1@reader1.panix.com>
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?

-- 
Grant Edwards               grant.b.edwards        Yow! It don't mean a
                                  at               THING if you ain't got
                              gmail.com            that SWING!!

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web