= 0 static let shared = NonSendable() // Error: Static property 'shared' is not concurrency- safe because non-'Sendable' type 'NonSendable' may have shared mutable state } let global = NonSendable() // Error: Let 'global' is not concurrency-safe because non-'Sendable' type 'NonSendable' may have shared mutable state
BTOPOJTPMBUFEXIFOVTFEXJUIJOUIFNPEVMFUIBUEF fi OFTUIFQSPQFSUZ w !4FOEBCMFJTJOGFSSFEGPSHMPCBMBDUPSJTPMBUFEGVODUJPOTBOEDMPTVSFT w (MPCBMBDUPSJTPMBUFEDMPTVSFTBSFBMMPXFEUPDBQUVSFOPO4FOEBCMFWBMVFTEFTQJUF CFJOH!4FOEBCMF w "HMPCBMBDUPSJTPMBUFETVCDMBTTPGBOPOJTPMBUFE OPO4FOEBCMFDMBTTJTBMMPXFE CVUJUNVTUCFOPO4FOEBCMF
async {} } actor MyActor { func main() async { let foo = Foo() await foo.run() // Error: passing argument of non-sendable type 'Foo' outside of actor-isolated context may introduce data races } } w ͳΜͱίϨ͕μϝ w AGPPA͕ӽڥ͍ͯ͠ΔͨΊ