Beispiel #1
0
        private static void StaticCallback(IntPtr loop, IntPtr watcher, EventTypes revents)
        {
            UnmanagedIdleWatcher iow = (UnmanagedIdleWatcher)Marshal.PtrToStructure(watcher, typeof(UnmanagedIdleWatcher));

            GCHandle    gchandle = GCHandle.FromIntPtr(iow.data);
            IdleWatcher w        = (IdleWatcher)gchandle.Target;

            w.callback(w.Loop, w, revents);
        }
Beispiel #2
0
        public void Dispose()
        {
            if (idle_watcher != null) {
                idle_watcher.Dispose ();
                idle_watcher = null;
            }

            if (want_poll_watcher != null) {
                want_poll_watcher.Dispose ();
                want_poll_watcher = null;
            }

            if (done_poll_watcher != null) {
                want_poll_watcher.Dispose ();
                done_poll_watcher = null;
            }
        }
Beispiel #3
0
        private void OnIdle(Loop loop, IdleWatcher watcher, EventTypes revents)
        {
            Console.WriteLine ("ON IDLE");

            if (eio_poll () != -1) {
                Console.WriteLine ("OnIdle: Stopping idle watcher");
                idle_watcher.Stop ();
            }
        }