The SubTasksDone::is_task_claimed function's name suggests a predicate, but it has the side-effect of claiming the task if it was previously unclaimed. Also, the sense of the result is inverted from what one really wants, returning true on failure to claim, false if claimed. As a result, all uses negate the result.
It should be renamed and the sense of the result should be flipped. Suggested name is "try_claim_task", with the "try_" prefix to emphasize that it can fail to claim (as opposed to "claim_task").
Similarly for SequentialSubtasksDone.
It should be renamed and the sense of the result should be flipped. Suggested name is "try_claim_task", with the "try_" prefix to emphasize that it can fail to claim (as opposed to "claim_task").
Similarly for SequentialSubtasksDone.