Replies: 2 comments 2 replies
-
Hi, thanks for taking a look at turmoil! Within each host we use a paused runtime that we step forward deterministically with each step using the LocalSet. Our use of the current thread, LocalSet, emulated sockets, and this timing mechanism make all of this work. Here is where all the magic happens: https://github.com/tokio-rs/turmoil/blob/main/src/rt.rs#L126-L148 That said, its up to the software (just a future) that runs on each host to do the rest. Things like iterating a |
Beta Was this translation helpful? Give feedback.
-
We've got a long standing issue to create some documentation about this: #19. It just hasn't been picked up yet. |
Beta Was this translation helpful? Give feedback.
-
Hi there,
I’ve read a bit of the code to understand how things work under the hood and have question about determinism. Every host uses its own tokio’s single-threaded executor and Sim simply iterates over hosts in a deterministic order and ticks every host. Is determinism of per-host runtime guaranteed somehow? In other words how it’s achieved that host has some tasks to run and execution of those will be deterministic?
Beta Was this translation helpful? Give feedback.
All reactions