Initial SourceWithContext, FlowWithContext, FlowWithContextOps.

(based on https://github.com/akka/akka/compare/master...jrudolph:jr/withContextOps)
This commit is contained in:
Raymond Roestenburg 2018-11-16 15:00:30 +01:00
parent fee98217e6
commit d76d259408
10 changed files with 727 additions and 1 deletions

View file

@ -7,7 +7,7 @@ package akka.stream.scaladsl
import java.util.concurrent.CompletionStage
import akka.actor.{ ActorRef, Cancellable, Props }
import akka.annotation.InternalApi
import akka.annotation.{ ApiMayChange, InternalApi }
import akka.stream.actor.ActorPublisher
import akka.stream.impl.Stages.DefaultAttributes
import akka.stream.impl.fusing.GraphStages
@ -215,6 +215,11 @@ final class Source[+Out, +Mat](
combineRest(2, rest.iterator)
})
/**
* API MAY CHANGE
*/
@ApiMayChange
def startContextPropagation[Ctx](f: Out Ctx): SourceWithContext[Ctx, Out, Mat] = SourceWithContext(this).mapContext(f)
}
object Source {