Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit ff8ea77

Browse files
authored
Merge pull request #25 from xnxkzeu/patch-1
Relaxed memory ordering is enough for atomic counter
2 parents 935bfde + 8eb952a commit ff8ea77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub struct JobIdCounter(Arc<AtomicU64>);
8484
impl JobIdCounter {
8585
#[allow(clippy::should_implement_trait)]
8686
pub fn next(&self) -> JobId {
87-
JobId(self.0.fetch_add(1, Ordering::SeqCst))
87+
JobId(self.0.fetch_add(1, Ordering::Relaxed))
8888
}
8989
}
9090

0 commit comments

Comments
 (0)