File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ static void swift_task_reportIllegalTaskLocalBindingWithinWithTaskGroupImpl(
248
248
" The following example is illegal:\n\n "
249
249
" await withTaskGroup(...) { group in \n "
250
250
" await <task-local>.withValue(1234) {\n "
251
- " group.spawn { ... }\n "
251
+ " group.addTask { ... }\n "
252
252
" }\n "
253
253
" }\n "
254
254
" \n "
@@ -257,21 +257,21 @@ static void swift_task_reportIllegalTaskLocalBindingWithinWithTaskGroupImpl(
257
257
" // bind task-local for all tasks spawned within the group\n "
258
258
" await <task-local>.withValue(1234) {\n "
259
259
" await withTaskGroup(...) { group in\n "
260
- " group.spawn { ... }\n "
260
+ " group.addTask { ... }\n "
261
261
" }\n "
262
262
" }\n "
263
263
" \n "
264
264
" or, inside the specific task-group child task:\n "
265
265
" \n "
266
266
" // bind-task-local for only specific child-task\n "
267
267
" await withTaskGroup(...) { group in\n "
268
- " group.spawn {\n "
268
+ " group.addTask {\n "
269
269
" await <task-local>.withValue(1234) {\n "
270
270
" ... \n "
271
271
" }\n "
272
272
" }\n "
273
273
" \n "
274
- " group.spawn { ... }\n "
274
+ " group.addTask { ... }\n "
275
275
" }\n " ,
276
276
(int )fileLength, file,
277
277
(int )line);
You can’t perform that action at this time.
0 commit comments