-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix blender save #590
base: main
Are you sure you want to change the base?
Fix blender save #590
Conversation
`std::sync::mpsc::Sender` implements `Sync` since version 1.72, so there is no need for crossbeam anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will need way more documentation to keep this usable in the future
@@ -455,7 +503,12 @@ impl<T: FileIdCache> DebounceDataInner<T> { | |||
} | |||
|
|||
if let Some(target_queue) = self.queues.get_mut(&event.paths[0]) { | |||
if !target_queue.was_created() { | |||
if target_queue.was_removed() { | |||
let event = target_queue.events.pop_front().unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we fine with that unwrap ?
|
||
events_expired.push(event); | ||
} else { | ||
self.queues.get_mut(&path).unwrap().events.push_front(event); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here for unwrap stuff - want to avoid crashing and rather report an error
The debouncer is getting increasingly complicated. It took me a few tries to design this change as defensively as possible. I hope it doesn't break anything.
This PR is based on #569.