本文整理汇总了C++中VM::dequeue_thread方法的典型用法代码示例。如果您正苦于以下问题:C++ VM::dequeue_thread方法的具体用法?C++ VM::dequeue_thread怎么用?C++ VM::dequeue_thread使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VM
的用法示例。
在下文中一共展示了VM::dequeue_thread方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_dequeue_thread_sets_queued_false
void test_dequeue_thread_sets_queued_false() {
Thread* thread = Thread::create(state);
thread->queued(state, Qtrue);
state->dequeue_thread(thread);
TS_ASSERT_EQUALS(Qfalse, thread->queued());
}
示例2: test_dequeue_thread_removes_from_scheduled
void test_dequeue_thread_removes_from_scheduled() {
Thread* thread = Thread::create(state);
thread->priority(state, Fixnum::from(0));
state->queue_thread(thread);
List* zeroes = as<List>(state->globals.scheduled_threads->at(state, 0));
TS_ASSERT_EQUALS(1, zeroes->count()->to_native());
state->dequeue_thread(thread);
TS_ASSERT_EQUALS(Qfalse, thread->queued());
TS_ASSERT_EQUALS(0, zeroes->count()->to_native());
}