WIP: Poll each task's tristanable queue and then dequeue if ready

This commit is contained in:
Tristan B. Velloza Kildaire 2021-09-09 11:23:59 +02:00
parent f195d11025
commit bc80c4aec5
1 changed files with 18 additions and 0 deletions

View File

@ -152,7 +152,25 @@ public final class TaskManager : Thread
private void worker()
{
while(true)
{
currentTasksLock.lock();
foreach(Task task; currentTasks)
{
/* Find the matching tristananble queue */
TQueue tQueue = manager.getQueue(task.getID());
/* TODO: Poll queue here */
if(tQueue.poll())
{
/* Dequeue the item */
QueueItem tQueueItem = tQueue.dequeue();
}
}
currentTasksLock.unlock();
}
}
/**