nim-codex/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 Add metrics (#478) 2023-07-20 09:56:28 +02:00
contracts Slot queue (#455) 2023-07-25 12:50:30 +10:00
erasure Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
manifest Makes rootHash private to Manifest object. (#488) 2023-07-19 16:06:59 +02:00
node [marketplace] Add Reservations Module (#340) 2023-04-04 17:05:16 +10:00
proving [marketplace] Simulate invalid proof submissions (#393) 2023-06-22 20:32:18 +10:00
purchasing Cancel and wait for asyncstatemachine futures when stopping (#493) 2023-07-31 15:09:34 +10:00
rest Add metrics (#478) 2023-07-20 09:56:28 +02:00
sales Cancel and wait for asyncstatemachine futures when stopping (#493) 2023-07-31 15:09:34 +10:00
storageproofs Improving proc/func formatting consistency (#454) 2023-06-22 08:11:18 -07:00
stores Add metrics (#478) 2023-07-20 09:56:28 +02:00
streams 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
blockexchange.nim Change every dagger to codex (#102) 2022-05-19 13:56:03 -06:00
blocktype.nim Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
chunker.nim Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
clock.nim [clock] waitUntil() completes immediately when block arrives (#475) 2023-07-13 11:19:45 +02:00
codex.nim Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
conf.nim Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
contracts.nim feat: contract address management (#405) 2023-05-03 09:24:25 +02:00
discovery.nim Restores the three key lines that make peer discovery work. (#484) 2023-07-18 07:51:20 +02:00
erasure.nim Improving proc/func formatting consistency (#454) 2023-06-22 08:11:18 -07:00
errors.nim Improving proc/func formatting consistency (#454) 2023-06-22 08:11:18 -07:00
formats.nim Remove protobuf serialization (#289) 2022-10-27 07:41:34 -06:00
manifest.nim Change every dagger to codex (#102) 2022-05-19 13:56:03 -06:00
market.nim Slot queue (#455) 2023-07-25 12:50:30 +10:00
namespaces.nim Add metrics (#478) 2023-07-20 09:56:28 +02:00
node.nim Makes rootHash private to Manifest object. (#488) 2023-07-19 16:06:59 +02:00
periods.nim Validator (#387) 2023-04-19 15:06:00 +02:00
proving.nim [marketplace] Simulate invalid proof submissions (#393) 2023-06-22 20:32:18 +10:00
purchasing.nim Improving proc/func formatting consistency (#454) 2023-06-22 08:11:18 -07:00
rng.nim track latest nim-libp2p's master branch (#248) 2022-11-02 11:40:28 -06:00
sales.nim Cancel and wait for asyncstatemachine futures when stopping (#493) 2023-07-31 15:09:34 +10:00
storageproofs.nim Validator (#387) 2023-04-19 15:06:00 +02:00
stores.nim Blockstore maintenance (#347) 2023-03-08 16:04:54 +01:00
streams.nim adding AsyncStreamWrapper (#110) 2022-06-14 09:19:35 -06:00
systemclock.nim Blockstore maintenance (#347) 2023-03-08 16:04:54 +01:00
units.nim Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
utils.nim Plumbing in conf types (#472) 2023-07-06 16:23:27 -07:00
validation.nim Improving proc/func formatting consistency (#454) 2023-06-22 08:11:18 -07:00