[quoted lines by Siju Samuel on 2013/12/13 at 17:24 -0600] >When we try to read and write simultaneously , read is handing until a >keypress is made. ... > if (brlapi_readKey(1, &key) > 0) {
brlapi.h: int BRLAPI_STDCALL brlapi_readKey(int wait, brlapi_keyCode_t *code); As you can see, the first argument of brlapi_readKey() is a boolean which tells it whether or not to wait. You pass in 1, which means that it should wait. That's why it's blocking until a key is pressed. Whether or not it's safe to write in one thread while reading in another is a question I'd prefer Samuel to answer. -- Dave Mielke | 2213 Fox Crescent | The Bible is the very Word of God. Phone: 1-613-726-0014 | Ottawa, Ontario | http://Mielke.cc/bible/ EMail: d...@mielke.cc | Canada K2A 1H7 | http://FamilyRadio.com/ _______________________________________________ This message was sent via the BRLTTY mailing list. To post a message, send an e-mail to: BRLTTY@mielke.cc For general information, go to: http://mielke.cc/mailman/listinfo/brltty