- 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`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-03-03 17:44:51 +02:00
parent e7f93cd78a
commit 8828e3ffdd
5 changed files with 11 additions and 8 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@ docs/
# Code coverage
*.lst
source/tristanable/queue.d
dub.selections.json

View File

@ -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",

View File

@ -1,7 +0,0 @@
{
"fileVersion": 1,
"versions": {
"bformat": "3.1.3",
"libsnooze": "0.2.5"
}
}

View File

@ -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;
}

View File

@ -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()