How to execute a blocking function that returns a value for a maximum amount of time in Java.
- by gamernb
How would I go about making a function that would do this in java.
String result = null
do
{
SendData()
// Run Blocking Function: ReceiveData() Until it returns a result
// or t seconds have elapsed
// if something returned, result = something
// else result = null
} while(result == null);