public override void AsyncDispatch(StatefulMessageHandler cb, object ob)
        {
            if (dispatcher == null)
                dispatcher = Runtime.DispatchService;

            dispatcher.GuiDispatch (cb, ob);
        }
        public override void Dispatch(StatefulMessageHandler cb, object ob)
        {
            if (dispatcher == null)
                dispatcher = Runtime.DispatchService;

            if (dispatcher.IsGuiThread)
                cb (ob);
            else
                dispatcher.GuiSyncDispatch (cb, ob);
        }