Commit Graph

91 Commits

Author SHA1 Message Date
Tristan B. Velloza Kildaire a51df3b699 Engine
- If a `Request` is not expecting a response then do not call `dequeue()` on the `Queue` registered nor `process`byte[])`
- Added a TODO comment
2023-05-04 14:17:35 +02:00
Tristan B. Velloza Kildaire 8387d0ee78 Request
- Implemented `expectsResponse()` which returns `false` if no response handler is assigned (implying no response is expected), `true` otherwise
2023-05-04 14:15:19 +02:00
Tristan B. Velloza Kildaire 7af21a909a Request
- Allow constructing WITHOUT a `ResponseHandler` (it remains as `null)
2023-05-04 11:04:32 +02:00
Tristan B. Velloza Kildaire 7072c852dc Request
- Removed now-completed TODO
2023-05-04 11:03:11 +02:00
Tristan B. Velloza Kildaire 93d6d49c20 - Clean up 2023-05-04 10:54:20 +02:00
Tristan B. Velloza Kildaire bb1dcef991 Engine
- `makeRequest(Request)` now cleans up by removing the adhoc `Queue` it registered in the beginning ofd the process
2023-05-04 09:55:00 +02:00
Tristan B. Velloza Kildaire 20da370f0e - Upgraded to `tristanable` `v3.2.0-beta` which introduces the required `releaseQueue(Queue)` and `releaseQueue_nothrow(Queue)` methods 2023-05-04 09:54:15 +02:00
Tristan B. Velloza Kildaire 4ef69ac670 Engine
- Documented `makeRequest(Request req)`
2023-05-03 21:58:06 +02:00
Tristan B. Velloza Kildaire 0b1c8242fd Engine
- Consumes a tristanable `Manager`
- Provides a `makeRequest(Request)` function which will generate a unique tristanable `Queue`, construct a `TaggedMessage` of the queue's ID with the gievn request data, it will then send the message via the tristanable `Manager`'s `sendMessage(TaggedMessage)` method, then await on the queue and lastly run the `Request`'s `ResponseHandler` function with the received data from the dequeued `TaggedMessage`

Request

- Defines a request with data to send and a function to handle a response
2023-05-03 21:20:19 +02:00
Tristan B. Velloza Kildaire bed096df27 - Removed direct dependency `bformat` and uneeded dependency `eventy` 2023-05-03 21:14:21 +02:00
Tristan B. Velloza Kildaire b0d0b19a4a - Added `tasky.engine` module
- Added `tasky.engine` module to the `tasky` package
2023-05-03 18:41:03 +02:00
Tristan B. Velloza Kildaire 0051099c1f - Updated the `.gitignore` 2023-05-03 18:40:27 +02:00
Tristan B. Velloza Kildaire 85a7558d79 - Upgraded tristanable from version `2.6.12` to the new beta `3.0.1-beta` 2023-04-05 15:51:25 +02:00
Tristan B. Velloza Kildaire 1cf310d92a - Updated `.gitignore`
- Removed `libtasky.a`
2023-03-19 18:20:51 +02:00
Tristan B. Velloza Kildaire 958e678ed2 - Removed `dub.selections.json` 2023-03-19 18:19:50 +02:00
Tristan B. Velloza Kildaire 852619f4a0 Dub
- Updated package copyright and authors
2023-03-19 18:11:23 +02:00
Tristan B. Velloza Kildaire b59bbf9c36 Restart 2023-03-19 18:09:58 +02:00
Tristan B. Velloza Kildaire 8e35e282c1 Descriptor must override a method that takes in a TaskyEvent as those will only ever be created, this means you no longer need to do an annoying cast from Event to TaskyEvent 2022-05-24 20:45:55 +02:00
Tristan B. Velloza Kildaire 726ad57706 Make TaskyEvent accessible at the module level 2022-05-24 20:28:28 +02:00
Tristan B. Velloza Kildaire 246adcc1f9 Added some rudimentary unittests that should have their order enforced
else stuff can go really wrong, these things run as part of a single process,
no restarts etc. Hence state is persisted across unittests
2022-05-24 19:53:26 +02:00
Tristan B. Velloza Kildaire 0d850d0508 Fixed compilation error by adding an implementation
for the DescriptorException used in jobs.d
2022-05-24 19:40:45 +02:00
Tristan B. Velloza Kildaire a7c18d5e10 Added ability to use a custom descriptor ID, throws exception if the given
descriptor ID is in use already
2022-05-24 19:39:49 +02:00
Tristan B. Velloza Kildaire 89347cb6d2 Future: Added addClass(ulong) to add a custom descriptor ID 2022-05-24 19:32:44 +02:00
Tristan B. Velloza Kildaire 2251a00284 Descriptor queue safety fix
Fixed a bug whereby if one were to get new Descriptor classes across
several threads then the Mutex for the descriptor queue would be reinitialzied
upon static initialization of the thread as the static initialization block
was not set to __gshared, causing a global re-write of a re-initted Mutex,
never the same Mutex
2022-05-24 19:23:46 +02:00
Tristan B. Velloza Kildaire 8ede79bf49 Future: Add support for fixed descriptor IDs 2022-05-24 19:20:39 +02:00
Tristan B. Velloza Kildaire bc6c90411a Added comment 2022-05-24 19:16:23 +02:00
Tristan B. Velloza Kildaire bfbf02efdb Added getPayload() method to TaskyEvent class 2022-05-24 15:08:37 +02:00
Tristan B. Velloza Kildaire 4380019665 Upgraded to tristanable v2.6.12 2022-05-21 15:19:15 +02:00
Tristan B. Velloza Kildaire b8ed656536 Fixed unit test 2022-05-19 21:08:50 +02:00
Tristan B. Velloza Kildaire e3ecc30497 Running status should be set from within startTasky() and after starting all sub-systems 2022-05-19 21:06:57 +02:00
Tristan B. Velloza Kildaire 92d1b1b900 Upgraded to new Eventy 2022-05-19 17:03:20 +02:00
Tristan B. Velloza Kildaire 8f8a1e724f Added stub method for future usage along with comments related to it 2022-05-19 16:51:44 +02:00
Tristan B. Velloza Kildaire 743744410c WIP: Adding some handling exposed via tristanable 2022-05-17 19:13:12 +02:00
Tristan B. Velloza Kildaire 3561ed8fda Added TODO list 2022-05-17 19:10:41 +02:00
Tristan B. Velloza Kildaire e64827b770 Upgraded tristanable 2022-05-10 15:24:42 +02:00
Tristan B. Velloza Kildaire 16ae65937a Added a shutdown() method which should stop tristanable and eventy, along with stopping the tasky main loop 2022-04-07 10:18:54 +02:00
Tristan B. Velloza Kildaire bcdc6121ca Cleaned up 2022-04-07 09:59:16 +02:00
Tristan B. Velloza Kildaire 8539485352 On timing out after 4 seconds of not having a task complete, fail the assertion test 2022-04-07 09:51:25 +02:00
Tristan B. Velloza Kildaire 1db1fad397 Cleaned up 2022-03-19 15:20:36 +02:00
Tristan B. Velloza Kildaire 78c22d3b4e Cleaned up 2022-03-19 15:20:27 +02:00
Tristan B. Velloza Kildaire d786130427 Removed uneeded function 2022-03-19 15:08:19 +02:00
Tristan B. Velloza Kildaire dfd0171c67 Pass unit tessts 2022-03-19 15:03:27 +02:00
Tristan B. Velloza Kildaire da5489a6b7 Using fixed tristanable 2022-03-19 13:40:21 +02:00
Tristan B. Velloza Kildaire 915b0ad115 WIP: GOtta figure out timing and maybe hot loops and shit 2022-03-19 12:57:59 +02:00
Tristan B. Velloza Kildaire 295d9ff672 Removed TODO
Don't let socket close
2022-03-19 12:29:04 +02:00
Tristan B. Velloza Kildaire e65459633c There are bugs or either timing is off for my test 2022-03-18 15:54:54 +02:00
Tristan B. Velloza Kildaire 20ec129f69 Testing multiple jobs 2022-03-17 16:47:09 +02:00
Tristan B. Velloza Kildaire 20e60a6f30 Works! 2022-03-17 16:32:52 +02:00
Tristan B. Velloza Kildaire 4c798aef6a WIP: Event dispatching loop 2022-03-16 17:10:15 +02:00
Tristan B. Velloza Kildaire 21e1b91abc Initialize tristanable, add a new tristanable queue on Descriptor registration 2022-01-21 10:21:45 +02:00