nim-dagger/codex/purchasing
Eric 3e80de3454
Cancel and wait for asyncstatemachine futures when stopping (#493)
* Simplify `.then` (promise api) and tests

* Remove tracked future when cancelled. Add tracked future tests

* Track and cancel statemachine futures

The futures created in each asyncstatemachine instance are tracked, and each future is cancelled and waited in `stop`.

Change `asyncstatemachine.stop` to be async so `machine.trackedFutures.cancelAndWait` could be called.
Add a constructor for `asyncstatemachine` that initialises the `trackedFutures` instance, and call the constructor from derived class constructors.
2023-07-31 15:09:34 +10:00
..
states Add metrics (#478) 2023-07-20 09:56:28 +02:00
purchase.nim Cancel and wait for asyncstatemachine futures when stopping (#493) 2023-07-31 15:09:34 +10:00
purchaseid.nim [purchasing] move Purchase and PurchaseId into separate modules 2022-10-25 15:10:35 +11:00
statemachine.nim Cleanup purchasing state machine (#422) 2023-06-05 10:48:06 +02:00