Example #1
0
            public void Invoke(OSDispatcher dispatcher, System.Action action, bool waitUntilDone)
            {
                DebugOutput("^^^^^^^^^^^^^^^ PERFORM from thread: " + NSThread.Current.Handle + ", MAIN: " + NSThread.MainThread.Handle + ", DISPATCHER: " + dispatcher.NativeDispatcher.Handle);
                var currentThread = NSThread.Current;

                if ((dispatcher.NativeDispatcher == currentThread) && waitUntilDone)
                {
                    action();
                }
                else
                {
                    DispatcherObject.PerformSelector(new Selector(OSDispatcher.ActionSelectorName), dispatcher.NativeDispatcher, new SelectorArgument(action), waitUntilDone);
                }
            }