Added a spinlock template as well as a thread work pool class.
Also, optimized shader compilation to happen on threads.
This commit is contained in:
parent
4fe3ee1730
commit
c613ead5fa
37 changed files with 458 additions and 192 deletions
|
|
@ -476,7 +476,7 @@ EditorResourcePreview::EditorResourcePreview() {
|
|||
thread = NULL;
|
||||
singleton = this;
|
||||
preview_mutex = Mutex::create();
|
||||
preview_sem = Semaphore::create();
|
||||
preview_sem = SemaphoreOld::create();
|
||||
order = 0;
|
||||
exit = false;
|
||||
exited = false;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class EditorResourcePreview : public Node {
|
|||
List<QueueItem> queue;
|
||||
|
||||
Mutex *preview_mutex;
|
||||
Semaphore *preview_sem;
|
||||
SemaphoreOld *preview_sem;
|
||||
Thread *thread;
|
||||
volatile bool exit;
|
||||
volatile bool exited;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue