Fixed bug where mutex lock object was 0 addr

This commit is contained in:
Tristan B. Velloza Kildaire 2021-09-01 14:50:39 +02:00
parent fd4bcb7ecd
commit 3a2637605a
1 changed files with 7 additions and 1 deletions

View File

@ -20,6 +20,12 @@ public final class Queue
private Mutex queueLock;
this(ulong id)
{
this.id = id;
queueLock = new Mutex();
}
public void add(Event e)
{
/* Lock the queue */
@ -38,7 +44,7 @@ public final class Queue
/* Lock the queue */
queueLock.lock();
has = (queue[]).empty();
has = !(queue[]).empty();
/* Unlock the queue */
queueLock.unlock();