[BRLTTY] Using brlapi simultaneous read and write
Dave Mielke
dave at mielke.cc
Fri Dec 13 19:29:11 EST 2013
[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: dave at mielke.cc | Canada K2A 1H7 | http://FamilyRadio.com/
More information about the BRLTTY
mailing list