Skip to content

Commit

Permalink
Update to latest nightly (spawn changes)
Browse files Browse the repository at this point in the history
  • Loading branch information
passcod committed Dec 22, 2014
1 parent fcda20b commit d45c954
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "notify"
version = "1.0.3"
version = "1.0.4"
authors = ["Félix Saparelli <me@passcod.name>"]

description = "Cross-platform filesystem notification library"
Expand Down
5 changes: 3 additions & 2 deletions src/inotify/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use self::inotify_sys::wrapper::{mod, INotify, Watch};
use std::collections::HashMap;
use std::io::IoErrorKind;
use std::sync::{Arc, RWLock};
use std::thread::Thread;
use super::{Error, Event, op, Op, Watcher};

mod flags;
Expand All @@ -21,7 +22,7 @@ impl INotifyWatcher {
let mut ino = self.inotify.clone();
let tx = self.tx.clone();
let paths = self.paths.clone();
spawn(move || {
Thread::spawn(move || {
loop {
match ino.wait_for_events() {
Ok(es) => {
Expand All @@ -40,7 +41,7 @@ impl INotifyWatcher {
}
}
}
})
}).detach();
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/poll.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::collections::{HashMap, HashSet};
use std::io::fs::{mod, PathExtensions};
use std::sync::{Arc, RWLock};
use std::thread::Thread;
use super::{Error, Event, op, Watcher};

pub struct PollWatcher {
Expand All @@ -14,7 +15,7 @@ impl PollWatcher {
let tx = self.tx.clone();
let watches = self.watches.clone();
let open = self.open.clone();
spawn(move || {
Thread::spawn(move || {
// In order of priority:
// TODO: populate mtimes before loop, and then handle creation events
// TODO: handle deletion events
Expand Down Expand Up @@ -100,7 +101,7 @@ impl PollWatcher {
}
}
}
})
}).detach();
}
}

Expand Down

0 comments on commit d45c954

Please sign in to comment.