Guest User

Untitled

a guest
Dec 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. var props = new RoundRobinPool(5).Props(Props.Create<MyActor>());
  2. var actor = Context.ActorOf(props);
  3.  
  4. flow = Source.Queue<Element>(2000,OverflowStrategy.Backpressure)
  5. .Select(x => {
  6. return new Wrapper() { Element = x, Request = ++cnt };
  7. })
  8. .To(Sink.ForEachParallel<Wrapper>(5, (s) => { actor.Tell(s); }))
  9. .Run(materializer);
Add Comment
Please, Sign In to add comment