From 8828e3ffddfbde611f1913021d05764cce46ba49 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Fri, 3 Mar 2023 17:44:51 +0200 Subject: [PATCH] Manager - Added an array of `Queue`(s) to the manager Queue - Added comments - Initialize the libsnooze `Event` during construction of the `Queue` type Dub - Upgraded libsnooze from `0.2.7` to `0.2.9` Repository - Removed `dub.selections.json` file - Added `dub.selections.json` to the `.gitignore` --- .gitignore | 1 + dub.json | 2 +- dub.selections.json | 7 ------- source/tristanable/manager.d | 5 +++++ source/tristanable/queue.d | 4 ++++ 5 files changed, 11 insertions(+), 8 deletions(-) delete mode 100644 dub.selections.json diff --git a/.gitignore b/.gitignore index d8386d5..1568aed 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ docs/ # Code coverage *.lst source/tristanable/queue.d +dub.selections.json diff --git a/dub.json b/dub.json index 82518e0..f7c7cc6 100644 --- a/dub.json +++ b/dub.json @@ -4,7 +4,7 @@ ], "copyright": "Copyright © 2023, Tristan B. Kildaire", "dependencies": { - "libsnooze": "0.2.7" + "libsnooze": "0.2.9" }, "description": "Tag-based asynchronous messaging framework", "license": "LGPL-3.0", diff --git a/dub.selections.json b/dub.selections.json deleted file mode 100644 index 1d9ad1c..0000000 --- a/dub.selections.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "fileVersion": 1, - "versions": { - "bformat": "3.1.3", - "libsnooze": "0.2.5" - } -} diff --git a/source/tristanable/manager.d b/source/tristanable/manager.d index 3222138..e3b6c37 100644 --- a/source/tristanable/manager.d +++ b/source/tristanable/manager.d @@ -1,10 +1,15 @@ module tristanable.manager; +import tristanable.queue : Queue; + /** * Allows one to add new queues, control * existing ones by waiting on them etc */ public class Manager { + /* Queues */ + private Queue[] queues; + } \ No newline at end of file diff --git a/source/tristanable/queue.d b/source/tristanable/queue.d index a21dc24..cc3e954 100644 --- a/source/tristanable/queue.d +++ b/source/tristanable/queue.d @@ -17,7 +17,11 @@ public class Queue private this() { + /* Initialize the queue lock */ this.queueLock = new Mutex(); + + /* Initialize the event */ + this.event = new Event(); } public void dequeue()