if (!queueEntry.isInUse()) { throw new Error("Yielding thread must have an inuse queueEntry"); } if (sleepQueueEntry.isInUse()) { throw new Error( "Yielding thread cannot have an inuse sleepQueueEntry"); }
    final void verifyState() throws UninterruptiblePragma {        switch (threadState) {        case CREATED:            break;        case ASLEEP:            break;        case DESTROYED:            break;        case RUNNING:            break;        case STOPPED:            break;        case SUSPENDED:            break;        case WAITING_ENTER:        case WAITING_NOTIFY:        case WAITING_NOTIFY_TIMEOUT:            if (waitForMonitor == null) {                throw new Error("Waiting thread must have a waitForMonitor");            }            break;        case YIELDING:            break;        default:            throw new Error("Unknown thread state " + threadState);        }        // Now detect deadlocks        detectDeadlock();    }