queue: remove useless defer
This commit is contained in:
parent
62ee6d1b58
commit
c99517181e
1 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ pub fn Queue(
|
||||||
}
|
}
|
||||||
if (self.isFull()) {
|
if (self.isFull()) {
|
||||||
// If we are full, wake up the push
|
// If we are full, wake up the push
|
||||||
defer Futex.wake(&self.futex, 1);
|
Futex.wake(&self.futex, 1);
|
||||||
}
|
}
|
||||||
const i = self.read_index;
|
const i = self.read_index;
|
||||||
self.read_index += 1;
|
self.read_index += 1;
|
||||||
|
@ -53,7 +53,7 @@ pub fn Queue(
|
||||||
self.mutex.lock();
|
self.mutex.lock();
|
||||||
}
|
}
|
||||||
if (self.isEmpty()) {
|
if (self.isEmpty()) {
|
||||||
defer Futex.wake(&self.futex, 1);
|
Futex.wake(&self.futex, 1);
|
||||||
}
|
}
|
||||||
const i = self.write_index;
|
const i = self.write_index;
|
||||||
self.write_index += 1;
|
self.write_index += 1;
|
||||||
|
|
Loading…
Reference in a new issue