mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -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>,
|
||||
cx: &mut Context,
|
||||
) -> Poll<Option<Self::Item>> {
|
||||
if self.event_detected.load(Ordering::Relaxed) {
|
||||
self.event_detected.store(false, Ordering::Relaxed);
|
||||
if self.event_detected.swap(false, Ordering::Relaxed) {
|
||||
Poll::Ready(Some(()))
|
||||
} else {
|
||||
let mut timer = self.project().timer;
|
||||
|
|
Loading…
Reference in a new issue