mirror of
https://github.com/apple/swift-async-algorithms
synced 2026-11-24 04:17:52 +00:00
Fixed simple mistake from pr/buffer
This commit is contained in:
1 parent
7545f0b7d2
commit
ed1d2a04cf
1 file changed
+2
-1
@@ -78,8 +78,9 @@ actor AsyncBufferState<Input: Sendable, Output: Sendable> {
|
||||
|
||||
func terminate() {
|
||||
terminationState = .terminal
|
||||
var oldPending = pending
|
||||
pending = []
|
||||
for continuation in pending {
|
||||
for continuation in oldPending {
|
||||
continuation.resume(returning: .success(nil))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user