System wide materializer (#27491)
Introduces a materializer started through an extension and then an implicit conversion for Scala turning an implicitly available ActorSystem into a materializer. The Java APIs has been ammended with run-methods accepting an ActorSystem.
This commit is contained in:
parent
77d1d33dbc
commit
45c826a218
196 changed files with 1148 additions and 1129 deletions
|
|
@ -8,7 +8,7 @@ package docs.stream
|
|||
|
||||
import akka.{ Done, NotUsed }
|
||||
import akka.actor.ActorSystem
|
||||
import akka.stream.{ ActorMaterializer, ClosedShape, OverflowStrategy }
|
||||
import akka.stream.{ ClosedShape, OverflowStrategy }
|
||||
import akka.stream.scaladsl._
|
||||
import scala.concurrent.Await
|
||||
import scala.concurrent.Future
|
||||
|
|
@ -79,17 +79,14 @@ class TwitterStreamQuickstartDocSpec extends AkkaSpec {
|
|||
trait Example1 {
|
||||
//#fiddle_code
|
||||
//#first-sample
|
||||
//#materializer-setup
|
||||
//#system-setup
|
||||
implicit val system = ActorSystem("reactive-tweets")
|
||||
implicit val materializer = ActorMaterializer()
|
||||
//#materializer-setup
|
||||
//#system-setup
|
||||
//#first-sample
|
||||
|
||||
//#fiddle_code
|
||||
}
|
||||
|
||||
implicit val materializer = ActorMaterializer()
|
||||
|
||||
"filter and map" in {
|
||||
//#first-sample
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue