pjfanning opened a new pull request, #2731: URL: https://github.com/apache/pekko/pull/2731
Port of [akka/akka-core#31735](https://github.com/akka/akka-core/pull/31735). Replaces custom `LazySingleSource` and `LazyFutureSource` graph stages with equivalent compositions of existing operators, removing ~120 lines of bespoke stage code. part of #2730 ### Changes - **`scaladsl/Source.scala`** - `lazySingle`: `fromGraph(new LazySingleSource(create))` → `single(()).map(_ => create()).withAttributes(DefaultAttributes.lazySingle)` - `lazyFuture`: `fromGraph(new LazyFutureSource(create))` → `single(()).mapAsyncUnordered(1)(_ => create()).withAttributes(DefaultAttributes.lazyFuture)` - **`impl/Stages.scala`**: Added `DefaultAttributes.lazySingle` and `DefaultAttributes.lazyFuture`; removed now-unused `lazySingleSource` and `lazyFutureSource` - **Deleted**: `impl/fusing/LazySingleSource.scala`, `impl/fusing/LazyFutureSource.scala` `mapAsyncUnordered(1)` is used directly for `lazyFuture` since `mapAsync(1)` is internally optimised to unordered anyway. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
