Hi everyone,
I want to intitialise an object to perform a certain computation and wait for the object to finish, but I'm not sure what the best way is to go about this.
Here's a couple of methods to give you an idea of what I'd like to do:
private void method()
{
if( flag == true )
{
activateEngine();
if( result == true )
{
...
}
}
}
private void activateEngine()
{
Engine eng = new Engine();
result = eng.getResult();
}
I'm not too savvy with threads yet, so any advice here would be most appreciated.
Thanks!