I've finally gotten a chance to look into this again, and I may have a meaningful clue as to what's happening.
I ran an strace, and although I can't reproduce the race on this single-CPU laptop, I *did* catch a background thread writing to stdout! It's the input thread, which does nothing but sit on wget_wch(). Armed with this fact, I headed off to the manpage... If the window is not a pad, and it has been moved or modified since the last call to wrefresh, wrefresh will be called before another character is read. *sound of forehead striking desk repeatedly* So, I need to find a way to do wget_wch() in my main thread, while still unblocking when a background thread posts a message to my global queue. I guess this means I have to make some sort of dummy pipe-to-myself so I can select() on stdin and it (ew ew ew)...except, does wget_wch always return on the first character? What about multibyte input? The wget_wch manpage is, as usual, silent... Argh, I hate curses. Daniel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]