set the lock the task is waiting on, and re-add spinning tasks when a lock is released