Closed CBenoit closed 2 years ago
I believe
tokio
is instrumented to useloom
when--cfg loom
is used
AFAIK, tokio's cfg(loom) is for testing tokio itself and is not exposed to the users.
[target.'cfg(loom)'.dev-dependencies] loom = { version = "0.5.2", features = ["futures", "checkpoint"] }
Oh, I understand. So I can't use tokio to mock a thread pool, and obviously there is a single permutation when there is no parallelism at all (new_current_thread
). Makes sense.
Thank you for the answer!
Hi,
I'm unable to run my loom model for some reason. (Permalink to my attempt)
My test harness is:
I'm running using this command:
Maybe because of the
new_multi_thread
, I get the panic even though I'm indeed running fromloom::model
:When I replace
new_multi_thread
bynew_current_thread
, the test ends successfully, but adding aprintln!
statement reveal the model is executed only once.I believe
tokio
is instrumented to useloom
when--cfg loom
is used, and I updated my own code to useloom
primitives instead ofstd
when appropriate. As such, I'm expecting more than one permutation to be executed.