Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Add comment for try_unblock() -> None
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Mar 18, 2024
1 parent 34f5650 commit ee5c8b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions unified-scheduler-logic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,10 @@ impl SchedulingStateMachine {
while let Some((requested_usage, task_with_unblocked_queue)) =
unblocked_task_from_queue
{
// When `try_unblock()` returns `None` as a failure of unblocking this time,
// this means there's still blocking usages. So, don't push task into
// unblocked_task_queue yet. It's guaranteed that every task will eventually
// succeed to be unblocked entering in this condition clause.
if let Some(task) = task_with_unblocked_queue.try_unblock(&mut self.count_token)
{
self.unblocked_task_queue.push_back(task);
Expand Down

0 comments on commit ee5c8b6

Please sign in to comment.