Merge pull request #25951 from RayRoestenburg/wip-context-operators
SourceWithContext and FlowWithContext
This commit is contained in:
commit
a920349090
12 changed files with 1061 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue