Soul-Engine icon indicating copy to clipboard operation
Soul-Engine copied to clipboard

Create Spinlock/Atomic Queue

Open Behemyth opened this issue 7 years ago • 0 comments

The sharedQueues_ in Soul Engine\Source\Parallelism\Fiber\SchedulerAlgorithm.h implement a spinlock that coordinates queue access. These queues follow the single producer multiple consumer model. Each thread creates its own work and other threads will try to steal work if they run out of their own work. Use the newly created spinlock, atomics, or some other lock-free mechanism for a similar queue. Place it somewhere like \Soul Engine\Source\Parallelism\Thread\____Queue.h/.cpp

Some helpful links: https://www.boost.org/doc/libs/1_68_0/libs/fiber/doc/html/index.html https://github.com/boostorg/fiber

Behemyth avatar Sep 10 '18 03:09 Behemyth