public void Stop () { lock (stateLock) { if (!started) return; requestStop = true; if (inDispatch) return; if (!thread.Join (2000)) thread.Abort (); requestStop = false; started = false; if (exc != null) throw exc; } }
public void StopDispatching (FileSystemWatcher fsw) { KqueueMonitor monitor = (KqueueMonitor)watches [fsw]; if (monitor == null) return; monitor.Stop (); }