File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ package actor TaskScheduler<TaskDescription: TaskDescriptionProtocol> {
433433 priority: priority ?? Task . currentPriority,
434434 description: taskDescription,
435435 taskPriorityChangedCallback: { [ weak self] ( newPriority) in
436- Task . detached ( priority: newPriority) {
436+ Task . detached ( priority: newPriority) { [ weak self ] in
437437 // If the task's priority got elevated, there might be an execution slot for it now. Poke the scheduler
438438 // to run the task if possible.
439439 await self ? . poke ( )
@@ -442,11 +442,11 @@ package actor TaskScheduler<TaskDescription: TaskDescriptionProtocol> {
442442 executionStateChangedCallback: executionStateChangedCallback
443443 )
444444 pendingTasks. append ( queuedTask)
445- Task . detached ( priority: priority ?? Task . currentPriority) {
445+ Task . detached ( priority: priority ?? Task . currentPriority) { [ weak self ] in
446446 // Poke the `TaskScheduler` to execute a new task. If the `TaskScheduler` is already working at its capacity
447447 // limit, this will not do anything. If there are execution slots available, this will start executing the freshly
448448 // queued task.
449- await self . poke ( )
449+ await self ? . poke ( )
450450 }
451451 return queuedTask
452452 }
You can’t perform that action at this time.
0 commit comments