[BRLTTY] Using brlapi simultaneous read and write

Siju Samuel sijusamueltech at gmail.com
Fri Dec 13 18:24:04 EST 2013


Hi,


When we try to  read and write simultaneously ,  read is handing until a
keypress is made.

A sketch of what I did is as below. Can  you please suggest  what is the
issue.

1. For that initially I open the connection and enter tty mode.
2. In one thread execute  brlapi_readKey() in a while loop and post the
KeyEvents
3. When ever there is some thing to write  perform the write in another
thread.




HE CALL STRUCTURE
--------------------------

MainThread
    brlapi_openConnection
    brlapi_enterTtyMode




Thread1:

while(1) {
   if (brlapi_readKey(1, &key) > 0) {
         //For the time being Just print.
   }
}


Thread2:   ( Which will be called when needed)
(brlapi_writeTextWin(0,  INPUTSTRING, 0) >= 0)

This call hangs until a key is pressed . Is it expected. And what is the
resolution.  Thanks In advance


Thanks,
Siju Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mielke.cc/pipermail/brltty/attachments/20131213/66337931/attachment.html>


More information about the BRLTTY mailing list