mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
Fix race condition in file watcher (#9105)
This commit is contained in:
parent
ca07bab594
commit
060bfe7df8
1 changed files with 1 additions and 2 deletions
|
@ -55,8 +55,7 @@ impl Stream for Debounce {
|
||||||
self: Pin<&mut Self>,
|
self: Pin<&mut Self>,
|
||||||
cx: &mut Context,
|
cx: &mut Context,
|
||||||
) -> Poll<Option<Self::Item>> {
|
) -> Poll<Option<Self::Item>> {
|
||||||
if self.event_detected.load(Ordering::Relaxed) {
|
if self.event_detected.swap(false, Ordering::Relaxed) {
|
||||||
self.event_detected.store(false, Ordering::Relaxed);
|
|
||||||
Poll::Ready(Some(()))
|
Poll::Ready(Some(()))
|
||||||
} else {
|
} else {
|
||||||
let mut timer = self.project().timer;
|
let mut timer = self.project().timer;
|
||||||
|
|
Loading…
Reference in a new issue