> ## Documentation Index
> Fetch the complete documentation index at: https://smithers.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# <MergeQueue>

> Queue child tasks so at most maxConcurrency run; defaults to single-lane.

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
// Props
import { MergeQueue } from "smithers-orchestrator";

type MergeQueueProps = {
  id?: string;
  maxConcurrency?: number;  // default: 1
  priority?: number; // inherited task priority; default 1000
  failurePolicy?: "halt" | "quarantine";
  skipIf?: boolean;
  children?: ReactNode;
};
```

```tsx theme={"theme":{"light":"github-light","dark":"github-dark"}}
<MergeQueue maxConcurrency={2}>
  {items.map((it, i) => (
    <Task key={i} id={`t${i}`} output={outputs.outputC}>{{ value: i }}</Task>
  ))}
</MergeQueue>
```

## Notes

* Innermost group determines the effective cap for its descendants; tasks
  outside the queue are unaffected.
* Default priority `1000` lets ready landing work claim a free run slot before
  ordinary tasks at priority `0`; an explicit child priority wins.
* `failurePolicy="quarantine"` lets unrelated queue branches continue after a
  child fails; default `halt` fails the run.
