Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
okJiang committed Dec 18, 2023
1 parent c442754 commit 3781105
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/disttask/framework/taskexecutor/slot.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,8 @@ func (sm *slotManager) unReserve(taskID int64) {

// canReserve is used to check whether the instance has enough slots to run the task.
func (sm *slotManager) canReserve(task *proto.Task) bool {
sm.Lock()
defer sm.Unlock()

return sm.available >= task.Concurrency
}

0 comments on commit 3781105

Please sign in to comment.