mutiple input streams
i have two different input streams from different locations.
i want to wait for data on these streams and then process that data.
at the moment i have it like:
string a = inputa.readline();
string b = inputb.readline();
if(string a.equals(something){//do soemthing
if(string b.equals(something){//do soemthing else
but obviously this is a bad way of doing it because b may have to wait for datato come on a, and a may have to wait for data to come on b.
what is a simple alternative (pref. without threading).
thanks.

