mirror of
https://github.com/apple/swift-log
synced 2026-11-30 04:18:44 +00:00
explicitly mark functions on internal types as internal (for jazzy) (#11)
This commit is contained in:
1 parent
98886523fb
commit
766ff20cc8
1 file changed
+6
-6
@@ -66,7 +66,7 @@ extension Lock {
|
||||
/// - Parameter body: The block to execute while holding the lock.
|
||||
/// - Returns: The value returned by the block.
|
||||
@inlinable
|
||||
public func withLock<T>(_ body: () throws -> T) rethrows -> T {
|
||||
internal func withLock<T>(_ body: () throws -> T) rethrows -> T {
|
||||
self.lock()
|
||||
defer {
|
||||
self.unlock()
|
||||
@@ -76,7 +76,7 @@ extension Lock {
|
||||
|
||||
// specialise Void return (for performance)
|
||||
@inlinable
|
||||
public func withLockVoid(_ body: () throws -> Void) rethrows {
|
||||
internal func withLockVoid(_ body: () throws -> Void) rethrows {
|
||||
try self.withLock(body)
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,7 @@ extension ReadWriteLock {
|
||||
/// - Parameter body: The block to execute while holding the lock.
|
||||
/// - Returns: The value returned by the block.
|
||||
@inlinable
|
||||
public func withReaderLock<T>(_ body: () throws -> T) rethrows -> T {
|
||||
internal func withReaderLock<T>(_ body: () throws -> T) rethrows -> T {
|
||||
self.lockRead()
|
||||
defer {
|
||||
self.unlock()
|
||||
@@ -156,7 +156,7 @@ extension ReadWriteLock {
|
||||
/// - Parameter body: The block to execute while holding the lock.
|
||||
/// - Returns: The value returned by the block.
|
||||
@inlinable
|
||||
public func withWriterLock<T>(_ body: () throws -> T) rethrows -> T {
|
||||
internal func withWriterLock<T>(_ body: () throws -> T) rethrows -> T {
|
||||
self.lockWrite()
|
||||
defer {
|
||||
self.unlock()
|
||||
@@ -166,13 +166,13 @@ extension ReadWriteLock {
|
||||
|
||||
// specialise Void return (for performance)
|
||||
@inlinable
|
||||
public func withReaderLockVoid(_ body: () throws -> Void) rethrows {
|
||||
internal func withReaderLockVoid(_ body: () throws -> Void) rethrows {
|
||||
try self.withReaderLock(body)
|
||||
}
|
||||
|
||||
// specialise Void return (for performance)
|
||||
@inlinable
|
||||
public func withWriterLockVoid(_ body: () throws -> Void) rethrows {
|
||||
internal func withWriterLockVoid(_ body: () throws -> Void) rethrows {
|
||||
try self.withWriterLock(body)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user