mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
There are multiple reasons to do this. Primarily this is useful as an optimization. Whenever analysis can determine that no potentially conflicting access occurs within the scope, the access can be demoted to "nontracking". It is also useful as an escape hatch for future code deploying to older runtimes. For example, if a future access scope may cross threads, and the older runtime doesn't know how to migrate threads. See <rdar://problem/37507434> add a flag to swift_beginAccess to inform the runtime that an access might migrate between threads
11 KiB
11 KiB