Enormous merge with master which probably led to the indirect unfortunate deaths of several kittens

This commit is contained in:
Viktor Klang 2011-12-14 17:26:18 +01:00
commit e959493e12
85 changed files with 983 additions and 1333 deletions

View file

@ -9,6 +9,8 @@ import akka.actor.Props;
//#import-future
import akka.dispatch.Future;
import akka.dispatch.Await;
import akka.util.Duration;
//#import-future
@ -28,8 +30,9 @@ import akka.actor.UntypedActorFactory;
import akka.dispatch.MessageDispatcher;
import org.junit.Test;
import scala.Option;
import java.lang.Object;
import java.util.concurrent.TimeUnit;
import static org.junit.Assert.*;
@ -93,17 +96,8 @@ public class UntypedActorTestBase {
}));
//#using-ask
Future future = myActor.ask("Hello", 1000);
future.await();
if (future.isCompleted()) {
Option resultOption = future.result();
if (resultOption.isDefined()) {
Object result = resultOption.get();
// ...
} else {
//... whatever
}
}
Future<Object> future = myActor.ask("Hello", 1000);
Object result = Await.result(future, Duration.create(1, TimeUnit.SECONDS));
//#using-ask
system.shutdown();
}