---
title: "init(upstream:other:)"
framework: combine
role: symbol
role_heading: Initializer
path: "combine/publishers/prefixuntiloutput/init(upstream:other:)"
---

# init(upstream:other:)

Creates a publisher that republishes elements until another publisher emits an element.

## Declaration

```swift
init(upstream: Upstream, other: Other)
```

## Parameters

- `upstream`: The publisher from which this publisher receives elements.
- `other`: Another publisher, the first output from which causes this publisher to finish.
