[Mono-bugs] [Bug 342971] New: DefaultWatcher is blocking while InotifyWatcher is not

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Nov 20 08:11:04 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=342971

           Summary: DefaultWatcher is blocking while InotifyWatcher is not
           Product: Mono: Class Libraries
           Version: 1.2.4
          Platform: Other
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: anders at iola.dk
         QAContact: mono-bugs at ximian.com
          Found By: ---


With the following code I get two different results depending on whetever or
not I run with MONO_MANAGED_WATCHER=1 or with MONO_MANAGED_WATCHER=0.

                        watcher = new FileSystemWatcher(watch_path);

                        watcher.IncludeSubdirectories = true;
            watcher.NotifyFilter = //NotifyFilters.CreationTime |
                NotifyFilters.FileName | NotifyFilters.LastAccess |
                NotifyFilters.LastWrite | NotifyFilters.Size;

                        watcher.Error += on_watch_error;
            watcher.Changed += on_file_changed;
            watcher.Created += on_file_created;
            watcher.Deleted += on_file_deleted;
                        watcher.Renamed += on_file_renamed;

                        System.Console.WriteLine("<<<< before
EnableRaisingEvents>>>>");

                        watcher.EnableRaisingEvents = true;

                        System.Console.WriteLine("<<<< after
EnableRaisingEvents>>>>");

With MONO_MANAGED_WATCHER=1 (=DefaultWatcher) I don't ever see the after
EnableRaisingEvents in my console, while with MONO_MANAGED_WATCHER=0 I do. This
must mean that DefaultWatcher is blocking and non-managed (Inotify) is not?


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list