bneukom / ch.fhnw.mdt

MicroCore development tools.
0 stars 0 forks source link

Waiting for readComplete on the forth reader not really reliable #23

Closed bneukom closed 8 years ago

bneukom commented 9 years ago

Originally reported by: bneukom (Bitbucket: bneukom, GitHub: bneukom)


available() method on the stream might return 0 before we get our desired result. We need another way to wait for the result to come


bneukom commented 9 years ago

Original comment by bneukom (Bitbucket: bneukom, GitHub: bneukom):


Mostily fixed this by another WaitFor implementation which uses Regex to wait for specific messages. With this solution we do not heavily rely on awaitReadCompletion but the performance might sometimes be significantly worse.