@@ -1306,18 +1306,24 @@ can increase your binary size and adversely affect performance.
1306
1306
1307
1307
### preconcurrency
1308
1308
1309
- Apply this attribute to an import declaration or a declaration,
1309
+ Apply this attribute to a declaration,
1310
1310
to suppress strict concurrency checking.
1311
1311
1312
1312
On an import declaration,
1313
- this attribute reduces the strictness of conccurrency checking
1313
+ this attribute reduces the strictness of concurrency checking
1314
1314
for code that uses types from the imported module.
1315
1315
Specifically,
1316
- types fromthe imported module
1317
- that aren't explicitly marked as either sendeble or nonsendable
1316
+ types from the imported module
1317
+ that aren't explicitly marked as either sendable or nonsendable
1318
1318
can be used in a context that requires sendable types.
1319
- <!-- XXX If the attribute isn't doing anything, it produces a warning.-->
1320
1319
1320
+ On other declarations,
1321
+ this attribute reduces the strictness of concurrency checking
1322
+ for code that uses the symbol being declared.
1323
+ When you use this symbol in a scope that has minimal concurrency checking,
1324
+ you can use members of this type
1325
+ that aren't explicitly marked as either sendable or nonsendable
1326
+ in a context that requires sendable types.
1321
1327
You can apply this attribute
1322
1328
to the following kinds of declarations:
1323
1329
@@ -1329,29 +1335,22 @@ to the following kinds of declarations:
1329
1335
- Initializers
1330
1336
- Functions
1331
1337
1332
- On a declaration ,
1333
- this attribute indicates
1338
+ You can use this attribute as follows ,
1339
+ to aid in migrating code to strict concurrency checking:
1334
1340
1335
- <!-- XXX from SE-0337
1336
- Its name is mangled as though it does not use any of the listed features.
1337
-
1338
- At use sites whose enclosing scope uses Minimal concurrency checking, the compiler will suppress any diagnostics about mismatches in these traits.
1339
-
1340
- The ABI checker will remove any use of these features when it produces its digests.
1341
- -->
1342
-
1343
- <!-- Probably move to some migration article/context:
1344
-
1345
- You can use this attribute to aid in migration to strict concurrency checking:
1346
-
1347
- 1. Enable strict checking
1348
- 1. Annotate imports with `@preconcurrency` as needed
1349
- 1. After migrating the imported module, XXX
1350
- 1. Remove `@preconcurrency` from import declarations
1351
- -->
1341
+ 1 . Enable strict checking.
1342
+ 1 . Annotate imports and declarations that need to be migrated
1343
+ with the ` preconcurrency ` attribute.
1344
+ 1 . After migrating a declaration,
1345
+ remove the ` preconcurrency ` attribute from it.
1346
+ 1 . After migrating a module,
1347
+ the compiler will warn you about
1348
+ any places where the ` preconcurrency ` attribute on an import
1349
+ no longer has an effect and should be removed.
1352
1350
1353
1351
Declarations from Objective-C are always imported
1354
1352
as if they were marked with the ` preconcurrency ` attribute.
1353
+
1355
1354
### propertyWrapper
1356
1355
1357
1356
Apply this attribute to a class, structure, or enumeration declaration
0 commit comments