tokio-rs / turmoil

Add hardship to your tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support bouncing a host

mcches opened this issue · comments

Is your feature request related to a problem? Please describe.
No. This is new functionality.

Describe the solution you'd like
Hosts in the simulation are simply futures. During run_until() I'd like to have the ability to "bounce" a host (cancel, join and restart).

Do you have thoughts on how to model it? Some things should persist, e.g., a simulated "disk".

A simulated "disk" could be part of the lib, similar Io. It is certainly more convenient to say a hash map is "durable" across restarts, but we could also take the stance you need to write to disk, which makes the simulation more realistic.

I think we can support bounce without state for now - seems like an orthogonal feature to me. The most immediate issue is that we need to restart the host code.