vk2gpu / Engine

Game Engine
Other
125 stars 14 forks source link

Job workers should sleep. #10

Closed vk2gpu closed 7 years ago

vk2gpu commented 7 years ago

Rather than simply calling Core::SwitchThread in a loop whilst trying to get a job, they should wait on a semaphore to ensure they aren't simply consuming CPU cycles when not necessary.

vk2gpu commented 7 years ago

Replaced Core::Event with Core::Semaphore, and now workers will wait on semaphores if there is no work.