Skip to content

Commit ce02a35

Browse files
committed
Revert "use checked continuations"
This reverts commit 83992aa.
1 parent ef93879 commit ce02a35

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/Operators/AsyncSwitchToLatestSequence.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ where Base.Element: AsyncSequence, Base: Sendable, Base.Element.Element: Sendabl
4646
enum BaseState {
4747
case notStarted
4848
case idle
49-
case waitingForChildIterator(CheckedContinuation<Task<ChildValue?, Never>?, Never>)
49+
case waitingForChildIterator(UnsafeContinuation<Task<ChildValue?, Never>?, Never>)
5050
case newChildIteratorAvailable(Result<Base.Element.AsyncIterator, Error>)
5151
case processingChildIterator(Result<Base.Element.AsyncIterator, Error>)
5252
case finished(Result<Base.Element.AsyncIterator, Error>?)
@@ -92,7 +92,7 @@ where Base.Element: AsyncSequence, Base: Sendable, Base.Element.Element: Sendabl
9292
}
9393

9494
enum BaseDecision {
95-
case resumeNext(CheckedContinuation<Task<ChildValue?, Never>?, Never>, Task<ChildValue?, Never>?)
95+
case resumeNext(UnsafeContinuation<Task<ChildValue?, Never>?, Never>, Task<ChildValue?, Never>?)
9696
case cancelPreviousChildTask(Task<ChildValue?, Never>?)
9797
}
9898

@@ -223,7 +223,7 @@ where Base.Element: AsyncSequence, Base: Sendable, Base.Element.Element: Sendabl
223223

224224
return try await withTaskCancellationHandler {
225225
while true {
226-
let childTask = await withCheckedContinuation { [state] (continuation: CheckedContinuation<Task<ChildValue?, Never>?, Never>) in
226+
let childTask = await withUnsafeContinuation { [state] (continuation: UnsafeContinuation<Task<ChildValue?, Never>?, Never>) in
227227
let decision = state.withCriticalRegion { state -> NextDecision in
228228
switch state.base {
229229
case .newChildIteratorAvailable(let childIterator):

0 commit comments

Comments
 (0)