presto-main/src/main/java/io/prestosql/execution/QueryStateMachine.java/QueryStateMachine/transitionToWaitingForResources
class QueryStateMachine:    public boolean transitionToWaitingForResources()
    {
        queryStateTimer.beginWaitingForResources();
        return queryState.setIf(WAITING_FOR_RESOURCES, currentState -> currentState.ordinal() < WAITING_FOR_RESOURCES.ordinal());
    }