in reply to Re^3: Semaphores failing to prevent race condition
in thread Semaphores failing to prevent race condition
I've been trying to figure out how I could do this, and while I'm not going to come right out and way that it can't be done in this way, it's going to be non-trivial. The inter-thread interface is going to be extremely complex, because while the listener and status threads simply print complete messages to the screen, the talker thread outputs one character at a time and does direct character positioning.
However, what I can possibly do is have the talker thread be the thread that does all the screen I/O for the other threads, in between listening for keyboard events. This would eliminate the need to figure out how to send its readline-like events as messages, and would satisfy the goal of having all I/O occur in a single thread.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Semaphores failing to prevent race condition
by roboticus (Chancellor) on Mar 14, 2011 at 19:31 UTC |