lv2: Ease the pain of lower end CPUs

- Avoid busy waiting in usleep code as much as possible, instead yield
- Also avoid busy_wait for SPU concurrency choker
This commit is contained in:
kd-11 2018-05-28 16:52:21 +03:00 committed by kd-11
parent 83f9be2524
commit d48f391b41
2 changed files with 15 additions and 7 deletions

View file

@ -159,10 +159,8 @@ namespace spu
{
if (remaining >= native_jiffy_duration_us)
std::this_thread::sleep_for(1ms);
else if (remaining > 100)
std::this_thread::yield();
else
busy_wait();
std::this_thread::yield();
const auto now = get_system_time();
const auto elapsed = now - start;