swift
900f9c73 - [region-isolation] Allow for Sendable global actor isolated closures to use transferred non-Sendable parameters.

Commit
1 year ago
[region-isolation] Allow for Sendable global actor isolated closures to use transferred non-Sendable parameters. This is safe since: 1. We transfer in the non-Sendable parameter into the global actor isolation region so we know that we will not use the non-Sendable paramter again except on that actor. 2. Since the closure is global actor isolated, we know that despite the fact that it is Sendable, it will only ever be executed serially on said global actor implying that we do not need to worry about different executions of the Sendable closure running concurrently with each other. rdar://125200006 (cherry picked from commit c3309d654a5d69e0e4d863b6198876098a91ee2b)
Author
Committer
Parents
  • lib/SILOptimizer/Analysis
    • File
      RegionAnalysis.cpp
  • test/Concurrency
    • File
      transfernonsendable.swift