Пример #1
0
        public IOLoop()
        {
            evloop = Loop.CreateDefaultLoop (0);

            prepare_watcher = new PrepareWatcher (evloop, HandlePrepareEvent);
            prepare_watcher.Start ();
        }
Пример #2
0
        private static void StaticCallback(IntPtr loop, IntPtr watcher, EventTypes revents)
        {
            UnmanagedPrepareWatcher iow = (UnmanagedPrepareWatcher)Marshal.PtrToStructure(watcher, typeof(UnmanagedPrepareWatcher));

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

            w.callback(w.Loop, w, revents);
        }
Пример #3
0
        public IOLoop()
        {
            evloop = Loop.CreateDefaultLoop (0);
            eio = new Libeio.Libeio ();

            eio.Initialize (evloop);

            prepare_watcher = new PrepareWatcher (evloop, HandlePrepareEvent);
            prepare_watcher.Start ();
        }
Пример #4
0
 private void HandlePrepareEvent(Loop loop, PrepareWatcher watcher, EventTypes revents)
 {
     if (!running) {
        loop.Unloop (UnloopType.All);
        prepare_watcher.Stop ();
         }
 }