Skip to content

Commit 0fa2665

Browse files
committed
@inlinable
1 parent 603b0c0 commit 0fa2665

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Sources/AllocatedLock.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@
3131

3232
// Backports the Swift interface around os_unfair_lock_t available in recent Darwin platforms
3333
//
34+
@usableFromInline
3435
struct AllocatedLock<State>: @unchecked Sendable {
3536

3637
@usableFromInline
3738
let storage: Storage
3839

40+
@usableFromInline
3941
init(initialState: State) {
4042
self.storage = Storage(initialState: initialState)
4143
}

Sources/IdentifiableContinuation.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
/// - body: A closure that takes a `IdentifiableContinuation` parameter.
4545
/// - handler: Cancellation closure executed when the current Task is cancelled. Handler is always called _after_ the body closure is compeled.
4646
/// - Returns: The value continuation is resumed with.
47+
@inlinable
4748
public func withIdentifiableContinuation<T>(
4849
isolation: isolated (any Actor)? = #isolation,
4950
function: String = #function,
@@ -90,6 +91,7 @@ public func withIdentifiableContinuation<T>(
9091
/// - body: A closure that takes a `IdentifiableContinuation` parameter.
9192
/// - handler: Cancellation closure executed when the current Task is cancelled. Handler is always called _after_ the body closure is compeled.
9293
/// - Returns: The value continuation is resumed with.
94+
@inlinable
9395
public func withIdentifiableThrowingContinuation<T>(
9496
isolation: isolated (any Actor)? = #isolation,
9597
function: String = #function,
@@ -138,6 +140,7 @@ public func withIdentifiableThrowingContinuation<T>(
138140
/// - handler: Cancellation closure executed when the current Task is cancelled. Handler is always called _after_ the body closure is compeled.
139141
/// - Returns: The value continuation is resumed with.
140142
@_unsafeInheritExecutor
143+
@inlinable
141144
public func withIdentifiableContinuation<T>(
142145
isolation: isolated some Actor,
143146
function: String = #function,
@@ -186,6 +189,7 @@ public func withIdentifiableContinuation<T>(
186189
/// - handler: Cancellation closure executed when the current Task is cancelled. Handler is always called _after_ the body closure is compeled.
187190
/// - Returns: The value continuation is resumed with.
188191
@_unsafeInheritExecutor
192+
@inlinable
189193
public func withIdentifiableThrowingContinuation<T>(
190194
isolation: isolated some Actor,
191195
function: String = #function,
@@ -225,6 +229,7 @@ public struct IdentifiableContinuation<T, E>: Sendable, Identifiable where E: Er
225229

226230
public final class ID: Hashable, Sendable {
227231

232+
@usableFromInline
228233
init() { }
229234

230235
public func hash(into hasher: inout Hasher) {
@@ -236,6 +241,7 @@ public struct IdentifiableContinuation<T, E>: Sendable, Identifiable where E: Er
236241
}
237242
}
238243

244+
@usableFromInline
239245
init(id: ID, continuation: CheckedContinuation<T, E>) {
240246
self.id = id
241247
self.continuation = continuation

0 commit comments

Comments
 (0)