MCPcopy Create free account
hub / github.com/Effect-TS/effect / flatMapConcurrent

Function flatMapConcurrent

packages/effect/src/Channel.ts:2514–2544  ·  view source on GitHub ↗
(
  self: Channel<OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>,
  f: (d: OutElem) => Channel<OutElem1, OutErr1, OutDone1, InElem1, InErr1, InDone1, Env1>,
  options: {
    readonly concurrency: number | "unbounded"
    readonly bufferSize?: number | undefined
  }
)

Source from the content-addressed store, hash-verified

2512 )
2513
2514const flatMapConcurrent = <
2515 OutElem,
2516 OutErr,
2517 OutDone,
2518 InElem,
2519 InErr,
2520 InDone,
2521 Env,
2522 OutElem1,
2523 OutErr1,
2524 OutDone1,
2525 InElem1,
2526 InErr1,
2527 InDone1,
2528 Env1
2529>(
2530 self: Channel<OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>,
2531 f: (d: OutElem) => Channel<OutElem1, OutErr1, OutDone1, InElem1, InErr1, InDone1, Env1>,
2532 options: {
2533 readonly concurrency: number | "unbounded"
2534 readonly bufferSize?: number | undefined
2535 }
2536): Channel<
2537 OutElem1,
2538 OutErr | OutErr1,
2539 OutDone,
2540 InElem & InElem1,
2541 InErr & InErr1,
2542 InDone & InDone1,
2543 Env | Env1
2544> => self.pipe(map(f), mergeAll(options))
2545
2546/**
2547 * Concatenates this channel with another channel created from the terminal value

Callers 1

Channel.tsFile · 0.85

Calls 3

mapFunction · 0.85
mergeAllFunction · 0.70
pipeMethod · 0.65

Tested by

no test coverage detected