Merge branch 'master' into wip-1581-patterns-ask
This commit is contained in:
commit
34a0f005b1
306 changed files with 1384 additions and 731 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (C) 2009-2011 Typesafe Inc. <http://www.typesafe.com>
|
||||
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
|
||||
*/
|
||||
package akka.docs.future;
|
||||
|
||||
|
|
@ -267,13 +267,13 @@ public class FutureDocTestBase {
|
|||
//A sequence of Futures, in this case Strings
|
||||
Iterable<Future<String>> futures = source;
|
||||
|
||||
Future<String> resultFuture = reduce(futures, new Function2<String, String, String>() {
|
||||
public String apply(String r, String t) {
|
||||
Future<Object> resultFuture = reduce(futures, new Function2<Object, String, Object>() {
|
||||
public Object apply(Object r, String t) {
|
||||
return r + t; //Just concatenate
|
||||
}
|
||||
}, system.dispatcher());
|
||||
|
||||
String result = Await.result(resultFuture, Duration.create(1, SECONDS));
|
||||
Object result = Await.result(resultFuture, Duration.create(1, SECONDS));
|
||||
//#reduce
|
||||
|
||||
assertEquals("ab", result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue