The method is not used anywhere, and it is a bad idea in general anyway.
If you see a need to call YieldCPU, then you're code is probably in need
of a redesign!
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/
1116853002
Cr-Commit-Position: refs/heads/master@{#28147}
}
-void Thread::YieldCPU() {
- int result = sched_yield();
- DCHECK_EQ(0, result);
- USE(result);
-}
-
-
static Thread::LocalStorageKey PthreadKeyToLocalKey(pthread_key_t pthread_key) {
#if V8_OS_CYGWIN
// We need to cast pthread_key_t to Thread::LocalStorageKey in two steps
USE(result);
}
-
-} } // namespace v8::base
+} // namespace base
+} // namespace v8
DCHECK(result);
}
-
-
-void Thread::YieldCPU() {
- Sleep(0);
-}
-
-} } // namespace v8::base
+} // namespace base
+} // namespace v8
}
#endif
- // A hint to the scheduler to let another thread run.
- static void YieldCPU();
-
-
// The thread name length is limited to 16 based on Linux's implementation of
// prctl().
static const int kMaxThreadNameLength = 16;
do {
{
v8::Unlocker unlocker(CcTest::isolate());
- Thread::YieldCPU();
}
} while (turn != SECOND_TIME_FILL_CACHE);
break;
}
}
-
- Thread::YieldCPU();
} while (true);
}
};