pdg: use mutex around cargo runs to avoid file race conditions#1380
pdg: use mutex around cargo runs to avoid file race conditions#1380
cargo runs to avoid file race conditions#1380Conversation
kkysen
commented
Sep 27, 2025
- Fixes Intermittent macOS CI failures #1365.
fw-immunant
left a comment
There was a problem hiding this comment.
An interior-mutable static within function scope was a little surprising to read (just b/c it's not common to see something interacting with itself across multiple concurrent calls to the same function) but is correct as far as I can tell.
kkysen
left a comment
There was a problem hiding this comment.
An interior-mutable
staticwithin function scope was a little surprising to read (just b/c it's not common to see something interacting with itself across multiple concurrent calls to the same function) but is correct as far as I can tell.
Yeah, kind of weird, but all of the concurrent calls are coming from here through the test framework, so it should work. I tried a few more complicated things before realizing I could just do this.