@@ -211,15 +211,17 @@ including important milestones.
211
211
```
212
212
The * version number* consists of one to three positive integers, separated by periods.
213
213
214
- - The ` noasync ` argument indicates that the declared symbol can't be used directly
214
+ - The ` noasync ` argument indicates that
215
+ the declared symbol can't be used directly
215
216
in an asynchronous context.
216
217
217
218
Because Swift concurrency can resume on a different thread
218
219
after a potential suspension point,
219
220
using elements like thread-local storage, locks, mutexes, or semaphores
220
221
across suspension points can lead to incorrect results.
221
222
222
- To avoid this problem, add an ` @available(*, noasync) ` attribute to the symbol's declaration:
223
+ To avoid this problem,
224
+ add an ` @available(*, noasync) ` attribute to the symbol's declaration:
223
225
224
226
``` swift
225
227
extension pthread_mutex_t {
@@ -248,7 +250,8 @@ including important milestones.
248
250
}
249
251
```
250
252
251
- If you can guarantee that your code uses a potentially unsafe symbol in a safe manner,
253
+ If you can guarantee that your code
254
+ uses a potentially unsafe symbol in a safe manner,
252
255
you can wrap it in a synchronous function and call that function
253
256
from an asynchronous context.
254
257
0 commit comments