mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 22:11:38 +00:00
Reduce number of threads needed for FsWatcher
This commit is contained in:
parent
12fd9aa1ef
commit
3c0fe4d684
3 changed files with 81 additions and 53 deletions
|
|
@ -72,6 +72,18 @@ impl Imfs {
|
|||
self.descend_and_read_from_disk(path)
|
||||
}
|
||||
|
||||
pub fn remove_root(&mut self, path: &Path) {
|
||||
debug_assert!(path.is_absolute());
|
||||
|
||||
if self.roots.get(path).is_some() {
|
||||
self.remove_item(path);
|
||||
|
||||
if let Some(parent_path) = path.parent() {
|
||||
self.unlink_child(parent_path, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn path_created(&mut self, path: &Path) -> io::Result<()> {
|
||||
debug_assert!(path.is_absolute());
|
||||
debug_assert!(self.is_within_roots(path));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue