nim-codex/tests/codex
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
..
blockexchange Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
helpers Slot queue (#455) 2023-07-25 12:50:30 +10:00
sales Cancel and wait for asyncstatemachine futures when stopping (#493) 2023-07-31 15:09:34 +10:00
storageproofs Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
stores Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
utils Cancel and wait for asyncstatemachine futures when stopping (#493) 2023-07-31 15:09:34 +10:00
examples.nim feat: collateral per slot (#390) 2023-04-14 11:04:17 +02:00
helpers.nim Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
testasyncheapqueue.nim Create memory-leak detecting test suite (#226) 2023-06-22 12:01:21 -06:00
testasyncstreamwrapper.nim Tests for AsyncStreamWrapper (#463) 2023-06-30 14:18:58 +02:00
testblockexchange.nim Blocks leak and inflight for pending blocks (#315) 2022-11-15 00:12:05 -06:00
testchunking.nim Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
testclock.nim Create memory-leak detecting test suite (#226) 2023-06-22 12:01:21 -06:00
testerasure.nim Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
testmanifest.nim Makes rootHash private to Manifest object. (#488) 2023-07-19 16:06:59 +02:00
testnode.nim Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
testproving.nim Create memory-leak detecting test suite (#226) 2023-06-22 12:01:21 -06:00
testpurchasing.nim Create memory-leak detecting test suite (#226) 2023-06-22 12:01:21 -06:00
testsales.nim Slot queue (#455) 2023-07-25 12:50:30 +10:00
teststorageproofs.nim Upload authenticators (#108) 2022-05-25 20:29:31 -06:00
teststores.nim Blockstore maintenance (#347) 2023-03-08 16:04:54 +01:00
teststorestream.nim Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
testsystemclock.nim Create memory-leak detecting test suite (#226) 2023-06-22 12:01:21 -06:00
testutils.nim Cancel and wait for asyncstatemachine futures when stopping (#493) 2023-07-31 15:09:34 +10:00
testvalidation.nim Create memory-leak detecting test suite (#226) 2023-06-22 12:01:21 -06:00