diff options
author | Ben Maurer <benm@mono-cvs.ximian.com> | 2005-05-27 03:18:18 +0400 |
---|---|---|
committer | Ben Maurer <benm@mono-cvs.ximian.com> | 2005-05-27 03:18:18 +0400 |
commit | dd19011aa66c00977c4e18b959d8c317860cbb63 (patch) | |
tree | 1e1b1a8c4358d7a735565a408ede2ad998f93699 /mcs/class/System/System.IO/FileSystemWatcher.cs | |
parent | f1ea3a510690b826a250a0a0849fe583b589485a (diff) |
locking fixes
svn path=/trunk/mcs/; revision=45088
Diffstat (limited to 'mcs/class/System/System.IO/FileSystemWatcher.cs')
-rw-r--r-- | mcs/class/System/System.IO/FileSystemWatcher.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mcs/class/System/System.IO/FileSystemWatcher.cs b/mcs/class/System/System.IO/FileSystemWatcher.cs index e4018da1210..d3d421ccc21 100644 --- a/mcs/class/System/System.IO/FileSystemWatcher.cs +++ b/mcs/class/System/System.IO/FileSystemWatcher.cs @@ -57,6 +57,7 @@ namespace System.IO { bool disposed; string mangledFilter; static IFileWatcher watcher; + static object lockobj = new object (); #endregion // Fields @@ -104,7 +105,7 @@ namespace System.IO { void InitWatcher () { - lock (typeof (FileSystemWatcher)) { + lock (lockobj) { if (watcher != null) return; |