Fixed bug whereby the queue mutex would not be unlocked.

This commit is contained in:
Tristan B. Kildaire 2020-06-23 14:22:00 +02:00
parent 0b0ded86ee
commit f440727800
3 changed files with 8 additions and 4 deletions

View File

@ -2,6 +2,6 @@
"fileVersion": 1,
"versions": {
"bformat": "1.0.8",
"tristanable": "0.0.16"
"tristanable": "0.0.17"
}
}

View File

@ -2,6 +2,6 @@
"fileVersion": 1,
"versions": {
"bformat": "1.0.8",
"tristanable": "0.0.16"
"tristanable": "0.0.17"
}
}

View File

@ -113,8 +113,10 @@ public final class Manager
/* The received data */
byte[] receivedData;
bool active = true;
/* Loop till fulfilled */
while(true)
while(active)
{
/* Lock the queue for reading */
lockQueue();
@ -125,7 +127,9 @@ public final class Manager
receivedData = requestQueue[getTagPosition(tag)].dataReceived;
/* TODO: Set the request to dead now */
break;
requestQueue[getTagPosition(tag)].isDead = true;
active = false;
}
/* Unlock the queue */