예제 #1
0
        private static void ShutDown_Callback(IntPtr intPtr, int arg)
        {
            ShutdownHandle shutdownHandle = GetObjectFromHandel <ShutdownHandle>(intPtr);

            if (shutdownHandle == null || shutdownHandle._callBack == null)
            {
                return;
            }
            try
            {
                shutdownHandle._callBack(arg, shutdownHandle._state);
            }
            catch
            {
                //ignore
            }
            shutdownHandle.DoDispose();
            shutdownHandle.Dispose();
            shutdownHandle._callBack = null;
            shutdownHandle._state    = null;
        }
예제 #2
0
 public void ShutDown(ShutdownHandle shutdownHandle, UvStreamHandle uvStreamHandle, ShutDown_Callback cb)
 {
     CheckError(_uv_shutdown(shutdownHandle, uvStreamHandle, cb));
 }