@@ -625,8 +625,8 @@ extension NIOThrowingAsyncSequenceProducer {
625
625
case . suspendTask:
626
626
// It is safe to hold the lock across this method
627
627
// since the closure is guaranteed to be run straight away
628
- return try await withCheckedThrowingContinuation {
629
- ( continuation: CheckedContinuation < Element ? , any Error > ) in
628
+ return try await withUnsafeThrowingContinuation {
629
+ ( continuation: UnsafeContinuation < Element ? , any Error > ) in
630
630
let ( action, callDidSuspend) = unsafe. withValueAssumingLockIsAcquired {
631
631
let action = $0. stateMachine. next ( for: continuation)
632
632
let callDidSuspend = $0. didSuspend != nil
@@ -723,7 +723,7 @@ extension NIOThrowingAsyncSequenceProducer {
723
723
case streaming(
724
724
backPressureStrategy: Strategy ,
725
725
buffer: Deque < Element > ,
726
- continuation: CheckedContinuation < Element ? , Error > ? ,
726
+ continuation: UnsafeContinuation < Element ? , Error > ? ,
727
727
hasOutstandingDemand: Bool ,
728
728
iteratorInitialized: Bool
729
729
)
@@ -916,13 +916,13 @@ extension NIOThrowingAsyncSequenceProducer {
916
916
/// Indicates that the continuation should be resumed and
917
917
/// ``NIOThrowingAsyncSequenceProducer/Source/YieldResult/produceMore`` should be returned.
918
918
case resumeContinuationAndReturnProduceMore(
919
- continuation: CheckedContinuation < Element ? , Error > ,
919
+ continuation: UnsafeContinuation < Element ? , Error > ,
920
920
element: Element
921
921
)
922
922
/// Indicates that the continuation should be resumed and
923
923
/// ``NIOThrowingAsyncSequenceProducer/Source/YieldResult/stopProducing`` should be returned.
924
924
case resumeContinuationAndReturnStopProducing(
925
- continuation: CheckedContinuation < Element ? , Error > ,
925
+ continuation: UnsafeContinuation < Element ? , Error > ,
926
926
element: Element
927
927
)
928
928
/// Indicates that the yielded elements have been dropped.
@@ -931,7 +931,7 @@ extension NIOThrowingAsyncSequenceProducer {
931
931
@usableFromInline
932
932
init (
933
933
shouldProduceMore: Bool ,
934
- continuationAndElement: ( CheckedContinuation < Element ? , Error > , Element ) ? = nil
934
+ continuationAndElement: ( UnsafeContinuation < Element ? , Error > , Element ) ? = nil
935
935
) {
936
936
switch ( shouldProduceMore, continuationAndElement) {
937
937
case ( true , . none) :
@@ -1040,7 +1040,7 @@ extension NIOThrowingAsyncSequenceProducer {
1040
1040
enum FinishAction {
1041
1041
/// Indicates that the continuation should be resumed with `nil` and
1042
1042
/// that ``NIOAsyncSequenceProducerDelegate/didTerminate()`` should be called.
1043
- case resumeContinuationWithFailureAndCallDidTerminate( CheckedContinuation < Element ? , Error > , Failure ? )
1043
+ case resumeContinuationWithFailureAndCallDidTerminate( UnsafeContinuation < Element ? , Error > , Failure ? )
1044
1044
/// Indicates that nothing should be done.
1045
1045
case none
1046
1046
}
@@ -1094,7 +1094,7 @@ extension NIOThrowingAsyncSequenceProducer {
1094
1094
case callDidTerminate
1095
1095
/// Indicates that the continuation should be resumed with a `CancellationError` and
1096
1096
/// that ``NIOAsyncSequenceProducerDelegate/didTerminate()`` should be called.
1097
- case resumeContinuationWithCancellationErrorAndCallDidTerminate( CheckedContinuation < Element ? , Error > )
1097
+ case resumeContinuationWithCancellationErrorAndCallDidTerminate( UnsafeContinuation < Element ? , Error > )
1098
1098
/// Indicates that nothing should be done.
1099
1099
case none
1100
1100
}
@@ -1273,7 +1273,7 @@ extension NIOThrowingAsyncSequenceProducer {
1273
1273
}
1274
1274
1275
1275
@inlinable
1276
- mutating func next( for continuation: CheckedContinuation < Element ? , Error > ) -> NextForContinuationAction {
1276
+ mutating func next( for continuation: UnsafeContinuation < Element ? , Error > ) -> NextForContinuationAction {
1277
1277
switch self . _state {
1278
1278
case . initial:
1279
1279
// We are transitioning away from the initial state in `next()`
0 commit comments