On Mon, Jun 02, 2008 at 06:13:26PM +0200, rdxesy(a)yahoo.de wrote:
My question is: how would I make sure to catch all
answers
from the device without using a thread and without just
waiting for an constant time before I check if there is an
answer( which is alo not very fail save, a message might
take a little longer if there is traffic on the midibus)?
There seem to be two ways: either you make the read blocking
(which will prevent you from doing anything until a reply
arrives), or use a separate thread to read (again blocking).
For apps handling async events using threads is really the
'natural' thing to do. If multithreading is new to you, now
is the time to jump into it !
Ciao,
--
FA
Laboratorio di Acustica ed Elettroacustica
Parma, Italia
Lascia la spina, cogli la rosa.