#19440 replace Scala Future usage with CompletionStage in javadsl
This entails:
* adding akka.pattern.PatternCS.* to enable ask etc. with
CompletionStage
* changing RequestContext to offer an ExecutionContextExecutor for the
CompletionStage.*Async combinators
* splitting up akka.stream.Queue for JavaDSL consistency
This commit is contained in:
parent
396f4370e9
commit
4c72495581
118 changed files with 1646 additions and 1379 deletions
|
|
@ -105,9 +105,9 @@ class BasicDirectivesExamplesSpec extends RoutingSpec {
|
|||
|
||||
def sample() =
|
||||
path("sample") {
|
||||
extractExecutionContext { implicit ec =>
|
||||
extractExecutionContext { implicit executor =>
|
||||
complete {
|
||||
Future(s"Run on ${ec.##}!") // uses the `ec` ExecutionContext
|
||||
Future(s"Run on ${executor.##}!") // uses the `executor` ExecutionContext
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -132,9 +132,9 @@ class BasicDirectivesExamplesSpec extends RoutingSpec {
|
|||
//#extractExecutionContext-0
|
||||
def sample() =
|
||||
path("sample") {
|
||||
extractExecutionContext { implicit ec =>
|
||||
extractExecutionContext { implicit executor =>
|
||||
complete {
|
||||
Future(s"Run on ${ec.##}!") // uses the `ec` ExecutionContext
|
||||
Future(s"Run on ${executor.##}!") // uses the `executor` ExecutionContext
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue