Returns a new channel that transforms each element using the function. @param transform the mapping function @param the output element type @return a new transformed channel @since 6.0.0
(Function<T, R> transform)
| 160 | * @since 6.0.0 |
| 161 | */ |
| 162 | default <R> AsyncChannel<R> map(Function<T, R> transform) { |
| 163 | AsyncChannel<R> out = create(getCapacity()); |
| 164 | AsyncSupport.getExecutor().execute(() -> { |
| 165 | try { |
no outgoing calls