Skip to content

Commit

Permalink
feat(SendableArray): .first property
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann committed Jul 21, 2023
1 parent 24de1c4 commit 03a33ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/InfomaniakCore/Asynchronous/SendableArray.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ public final class SendableArray<T>: @unchecked Sendable, Sequence {
}
}

public var first: T? {
lock.sync {
return content.first
}
}

public func makeIterator() -> IndexingIterator<[T]> {
lock.sync {
return content.makeIterator()
Expand Down

0 comments on commit 03a33ce

Please sign in to comment.