Inheritance: GenericMessageContainer
Exemplo n.º 1
0
        public static void ThreadDispatch(StatefulMessageHandler cb, object state)
        {
            StatefulMessageContainer smc = new StatefulMessageContainer(cb, state, false);
            Thread t = new Thread(new ThreadStart(smc.Run));

            t.IsBackground = true;
            t.Start();
        }
Exemplo n.º 2
0
        public static void GuiSyncDispatch(StatefulMessageHandler cb, object state)
        {
            if (IsGuiThread)
            {
                cb(state);
                return;
            }

            StatefulMessageContainer mc = new StatefulMessageContainer(cb, state, true);

            lock (mc) {
                QueueMessage(mc);
                Monitor.Wait(mc);
            }
            if (mc.Exception != null)
            {
                throw new Exception(errormsg, mc.Exception);
            }
        }
Exemplo n.º 3
0
 public static void ThreadDispatch(StatefulMessageHandler cb, object state)
 {
     StatefulMessageContainer smc = new StatefulMessageContainer (cb, state, false);
     Thread t = new Thread (new ThreadStart (smc.Run));
     t.IsBackground = true;
     t.Start ();
 }
Exemplo n.º 4
0
        public static void GuiSyncDispatch(StatefulMessageHandler cb, object state)
        {
            if (IsGuiThread) {
                cb (state);
                return;
            }

            StatefulMessageContainer mc = new StatefulMessageContainer (cb, state, true);
            lock (mc) {
                QueueMessage (mc);
                Monitor.Wait (mc);
            }
            if (mc.Exception != null)
                throw new Exception (errormsg, mc.Exception);
        }