throw new ClientException (error);
thread = new Thread (PollLoop);
+ thread.IsBackground = true;
thread.Start ();
}
if (handle != IntPtr.Zero) {
lock (this) {
avahi_client_free (handle);
+ handle = IntPtr.Zero;
+
avahi_simple_poll_quit (spoll);
+ Monitor.Wait (this);
+
avahi_simple_poll_free (spoll);
- handle = IntPtr.Zero;
}
}
}
try {
lock (this) {
avahi_simple_poll_loop (spoll);
+ Monitor.Pulse (this);
}
} catch (Exception e) {
Console.Error.WriteLine ("Error in avahi-sharp event loop: " + e);