Append notifications to queue

This commit is contained in:
Tristan B. Kildaire 2020-09-25 10:16:14 +02:00
parent db2125782e
commit 98cd3e8c1e
2 changed files with 14 additions and 5 deletions

View File

@ -271,6 +271,18 @@ public final class Manager
return false;
}
public void addNotification(NotificationReply notificationReply)
{
/* Lock the notification queue */
lockNotificationQueue();
/* Append the notification */
notificationQueue ~= notificationReply;
/* Unlock the notification queue */
unlockNotificationQueue();
}
}

View File

@ -92,14 +92,11 @@ public final class Watcher : Thread
*/
else if(manager.isReservedTag(receivedTag))
{
/* Lock the notification queue */
manager.lockNotificationQueue();
/* Create the NotificationReply */
NotificationReply notifyReply = new NotificationReply(receivedTag, receivedMessage);
/* Unlock the notification queue */
manager.unlockNotificationQueue();
/* Add the notification */
manager.addNotification(notifyReply);
}
else
{