Improving the readability

Co-authored-by: kennytm <kennytm@gmail.com>
This commit is contained in:
Stefan Lankes 2021-11-24 21:12:56 +01:00 committed by GitHub
parent 644b445428
commit 6911af9d06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ impl<T> Spinlock<T> {
let ticket = self.queue.fetch_add(1, Ordering::SeqCst) + 1;
let mut counter: u16 = 0;
while self.dequeue.load(Ordering::SeqCst) != ticket {
counter = counter + 1;
counter += 1;
if counter < 100 {
hint::spin_loop();
} else {