We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49d16a1 commit e35182bCopy full SHA for e35182b
libs/darwin-kperf/criterion/src/pmc.rs
@@ -128,6 +128,10 @@ impl HardwareCounter {
128
impl Drop for HardwareCounter {
129
#[expect(unsafe_code)]
130
fn drop(&mut self) {
131
+ // preempt the drop order, by calling `stop` here, instead of inside the ThreadSampler's
132
+ // drop.
133
+ let _result = self.thread.stop();
134
+
135
// SAFETY: the ThreadSampler field is dropped after this runs (struct
136
// drop order is field declaration order), and we are the sole owner.
137
// No ThreadSampler will be running after this point.
0 commit comments