File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,20 +176,20 @@ extension RawIORequest {
176176 }
177177
178178 @inlinable
179- static func withTimeoutRequest< R> (
179+ static func withTimeoutRequest< R, E : Error > (
180180 linkedTo opEntry: UnsafeMutablePointer < swift_io_uring_sqe > ,
181181 in timeoutEntry: UnsafeMutablePointer < swift_io_uring_sqe > ,
182- duration: Duration ,
183- flags: TimeOutFlags ,
184- work: ( ) throws -> R ) rethrows -> R {
182+ duration: Duration ,
183+ flags: TimeOutFlags ,
184+ work: ( ) throws ( E ) -> R ) throws ( E ) -> R {
185185
186186 opEntry. pointee. flags |= Flags . linkRequest. rawValue
187187 opEntry. pointee. off = 1
188188 var ts = timespec (
189- tv_sec: Int ( duration. components. seconds) ,
189+ tv_sec: Int ( duration. components. seconds) ,
190190 tv_nsec: Int ( duration. components. attoseconds / 1_000_000_000 )
191191 )
192- return try withUnsafePointer ( to: & ts) { tsPtr in
192+ return try withUnsafePointer ( to: & ts) { tsPtr throws ( E ) -> R in
193193 var req : RawIORequest = RawIORequest ( )
194194 req. operation = . link_timeout
195195 req. rawValue. timeout_flags = flags. rawValue
You can’t perform that action at this time.
0 commit comments