Suppose we have the following method.
public Object foo() {
...
...
...
bar();
return o;
}
And in this method there is a method call which sends data to the database. But the saving or processing can take a lot of time.
What are the possibilities that I do not have to wait for the method bar() to be processed? Well I want the saving from method bar() to run in the background and I want to be able to leave the methde foo() before bar() is finished.
Thanks.