replacing ThreadWaitingCondition with lambda
replacing ThreadStateCondition with lambda
more lambdarising