Skip to content

Commit ed1d2a0

Browse files
committed
Fixed simple mistake from pr/buffer
1 parent 7545f0b commit ed1d2a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/AsyncAlgorithms/AsyncBufferSequence.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ actor AsyncBufferState<Input: Sendable, Output: Sendable> {
7878

7979
func terminate() {
8080
terminationState = .terminal
81+
var oldPending = pending
8182
pending = []
82-
for continuation in pending {
83+
for continuation in oldPending {
8384
continuation.resume(returning: .success(nil))
8485
}
8586
}

0 commit comments

Comments
 (0)