Previously, when we were checking if a guard condition was triggered, we would actually check and reset it. But that means that when we later on went to set the appropriate things in the wait_set, we wouldn't actually set the guard_condition true, since it was false by that point.
Instead, add in two separate methods; the one that just returns whether it is triggered, which we call when checking, and the one that checks and resets, which we call when setting it in the wait_set.
Previously, when we were checking if a guard condition was triggered, we would actually check and reset it. But that means that when we later on went to set the appropriate things in the wait_set, we wouldn't actually set the guard_condition true, since it was false by that point.
Instead, add in two separate methods; the one that just returns whether it is triggered, which we call when checking, and the one that checks and resets, which we call when setting it in the wait_set.