diff --git a/src/monitor.d b/src/monitor.d index f8050ef523..be0ad9d859 100644 --- a/src/monitor.d +++ b/src/monitor.d @@ -133,7 +133,7 @@ shared class MonitorBackgroundWorker { } -void startMonitorJob(MonitorBackgroundWorker worker, Tid callerTid) +void startMonitorJob(shared(MonitorBackgroundWorker) worker, Tid callerTid) { try { worker.watch(callerTid); @@ -156,7 +156,7 @@ final class Monitor { bool check_nosync = false; // Configure Private Class Variables - MonitorBackgroundWorker worker; + shared(MonitorBackgroundWorker) worker; // map every inotify watch descriptor to its directory private string[int] wdToDirName; // map the inotify cookies of move_from events to their path @@ -187,7 +187,7 @@ final class Monitor { assert(onDirCreated && onFileChanged && onDelete && onMove); if (!buffer) buffer = new void[4096]; - worker = new MonitorBackgroundWorker; + worker = new shared(MonitorBackgroundWorker); worker.initialise(); // from which point do we start watching for changes? @@ -346,7 +346,7 @@ final class Monitor { return path; } - MonitorBackgroundWorker getWorker() { + shared(MonitorBackgroundWorker) getWorker() { return worker; }