mirror of https://github.com/deavmi/tasky.git
WIP: Poll each task's tristanable queue and then dequeue if ready
This commit is contained in:
parent
f195d11025
commit
bc80c4aec5
18
source/app.d
18
source/app.d
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue