mirror of
https://github.com/apple/container.git
synced 2026-09-14 11:45:39 +00:00
Add comments clarifying thread-safety (#282)
This commit is contained in:
@@ -267,6 +267,7 @@ extension SocketRelay {
|
||||
)
|
||||
}
|
||||
|
||||
// `buf1` isn't used concurrently.
|
||||
nonisolated(unsafe) let buf1 = UnsafeMutableBufferPointer<UInt8>.allocate(capacity: Int(getpagesize()))
|
||||
connSource.setEventHandler {
|
||||
Self.fdCopyHandler(
|
||||
@@ -278,6 +279,7 @@ extension SocketRelay {
|
||||
}
|
||||
|
||||
nonisolated(unsafe) let buf2 = UnsafeMutableBufferPointer<UInt8>.allocate(capacity: Int(getpagesize()))
|
||||
// `buf2` isn't used concurrently.
|
||||
vsockConnectionSource.setEventHandler {
|
||||
Self.fdCopyHandler(
|
||||
buffer: buf2,
|
||||
|
||||
Reference in New Issue
Block a user