Skip to content

Commit

Permalink
Document async channel a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkisemils committed Dec 18, 2024
1 parent 5dd7c1c commit 903a081
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ios/MullvadTypes/Promise.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public final class Promise<Success, Failure: Error> {
}
}

// This object can be used like an async semaphore with exactly 1 writer. It
// allows the waiter to wait to `receive()` from another operation
// asynchronously. It is important not to forget to call `send`, otherwise this
// operation will block indefinitely.
public struct OneshotChannel {
private var continuation: AsyncStream<Void>.Continuation?
private var stream: AsyncStream<Void>
Expand Down

0 comments on commit 903a081

Please sign in to comment.