Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/System/IORing/IORing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,8 @@ public struct IORing: ~Copyable {
break
}
}
try consumer(nil, nil, true)
}
try consumer(nil, nil, true)
}

@inlinable
Expand Down
11 changes: 11 additions & 0 deletions Tests/SystemTests/IORingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,17 @@ final class IORingTests: XCTestCase {
XCTAssertGreaterThanOrEqual(elapsed, .milliseconds(50))
}

func testBlockingConsumeCompletionsSendsDone() throws {
try XCTSkipIf(!uringEnabled, failureMessage)
var ring = try IORing(queueDepth: 4)
XCTAssertTrue(try ring.submit(linkedRequests: .nop()))
var dones: [Bool] = []
ring.blockingConsumeCompletions { (completion: consuming IORing.Completion?, error, done) in
dones.append(done)
}
XCTAssertEqual(dones, [false, true])
}

func testRegisterEventFDTwiceThrows() throws {
try XCTSkipIf(!uringEnabled, failureMessage)
var ring = try IORing(queueDepth: 4)
Expand Down
Loading