Skip to content

swift_beginAccess(______)

0x41c edited this page Feb 28, 2022 · 1 revision

swift_beginAccess(_:_:_:)

Starts dynamically tracking accesses to a variable for modification monitoring. This is to ensure the exclusivity rule. Learn more about it here at https:​//www.swift.org/blog/swift-5-exclusivity/

@_silgen_name("swift_beginAccess")
public func swift_beginAccess(
    _ variable: Any,
    _ valueBuffer: UnsafeRawPointer,
    _ exclusivityFlags: UnsafeRawPointer
)

This starts monitoring accesses as soon as it returns and will throw a runtime failiure if an incompatible access is underway.

Parameters

  • variable: A pointer to the object to monitor
  • valueBuffer: An associated ValueBuffer that acts as a tracked access storage for the pointer.
  • flags: Some ExclusivityFlags that determine the access actions that are allowed on the pointer.
Types
Protocols
Global Typealiases
Global Functions
Clone this wiki locally