Merge pull request #25951 from RayRoestenburg/wip-context-operators

SourceWithContext and FlowWithContext
This commit is contained in:
Patrik Nordwall 2019-01-18 17:27:10 +01:00 committed by GitHub
commit a920349090
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 1061 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,12 @@ final class Source[+Out, +Mat](
combineRest(2, rest.iterator)
})
/**
* API MAY CHANGE
*/
@ApiMayChange
def startContextPropagation[Ctx](f: Out Ctx): SourceWithContext[Ctx, Out, Mat] = new SourceWithContext(this.map(e (e, f(e))))
}
object Source {