Closed Restioson closed 2 years ago
Ok, it appears that this isn't working yet - not really sure how it didn't trigger in my initial cargo tests - so I will try and fix it.
Okay, I have fixed it. The last unresolved issue is around CI.
There are some workarounds included here which may be possible to get rid of if changes are made in loom (e.g atomic and cell get mut rather than with mut) , so maybe you'd want to wait to see how that pans out?
I've been investigating as to why my crate fails under loom, and this could be related to loom not supporting atomic SeqCst fences yet. If this is the case, then this PR may have to be closed pending loom being able to support that. That being said, I'm not sure that is the reason, so it will need some further investigation.
Obsoleted by #27
This PR implements loom-awareness for concurrent-queue. Particularly, downstream users can pass
--cfg loom
to rustc viaRUSTFLAGS
in order to then run loom tests for their crates using concurrent-queue, and have loom be able to test/track the concurrent-queue parts too.I'm not sure how this interacts with the CI. Ideally, the checking should be run with both loom on and off, the normal tests with loom off, and any loom tests with loom on. In order to enable loom, RUSTFLAGS must be set to have
--cfg loom
. I haven't written any loom tests for concurrent-queue in this PR yet, though that could come in subsequent work.