Merge paradox/scala/futures.md and java/futures.md (#23397)
This commit is contained in:
parent
e5249c69b6
commit
e0692b5e93
4 changed files with 326 additions and 354 deletions
17
akka-docs/src/test/java/jdocs/future/ActorWithFuture.java
Normal file
17
akka-docs/src/test/java/jdocs/future/ActorWithFuture.java
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package jdocs.future;
|
||||
|
||||
//#context-dispatcher
|
||||
import akka.actor.AbstractActor;
|
||||
import akka.dispatch.Futures;
|
||||
|
||||
public class ActorWithFuture extends AbstractActor {
|
||||
ActorWithFuture(){
|
||||
Futures.future(() -> "hello", getContext().dispatcher());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Receive createReceive() {
|
||||
return AbstractActor.emptyBehavior();
|
||||
}
|
||||
}
|
||||
// #context-dispatcher
|
||||
Loading…
Add table
Add a link
Reference in a new issue