File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ public final class NIOLoopBoundBox<Value>: @unchecked Sendable {
176176 }
177177 }
178178
179+ #if compiler(>=6.0)
179180 /// Safely access and potentially modify the contained value with a closure.
180181 ///
181182 /// This method provides a way to perform operations on the contained value while ensuring
@@ -194,4 +195,5 @@ public final class NIOLoopBoundBox<Value>: @unchecked Sendable {
194195 defer { self . _value = value }
195196 return try handler ( & value)
196197 }
198+ #endif
197199}
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ final class NIOLoopBoundTests: XCTestCase {
116116 XCTAssertTrue ( loopBoundBox. value. mutateInPlace ( ) )
117117 }
118118
119+ #if compiler(>=6.0)
119120 func testWithValue( ) {
120121 var expectedValue = 0
121122 let loopBound = NIOLoopBoundBox ( expectedValue, eventLoop: loop)
@@ -143,6 +144,7 @@ final class NIOLoopBoundTests: XCTestCase {
143144
144145 XCTAssertEqual ( 10 , loopBound. value, " Ensure value is set even if we throw " )
145146 }
147+ #endif
146148
147149 // MARK: - Helpers
148150 func sendableBlackhole< S: Sendable > ( _ sendableThing: S ) { }
You can’t perform that action at this time.
0 commit comments