/// <summary> /// Asynchronously invokes the action on a new thread and returns immediately. /// </summary> /// <param name="actionWithId">The delegate that will be executed on the new thread.</param> /// <param name="arg">The single argument passed to the target. May be nil.</param> public static void StartNewThread(Action<Id> actionWithId, Id arg) { NSThreadLauncher launcher = new NSThreadLauncher(actionWithId); launcher.PerformSelectorInBackgroundWithObject(NSThreadLauncher.LaunchSelector, arg); }
/// <summary> /// Asynchronously invokes the action on a new thread and returns immediately. /// </summary> /// <param name="actionWithState">The delegate that will be executed on a new thread.</param> /// <param name="state">The single argument passed to the target. May be nil.</param> public static void StartNewThread(Action<Object> actionWithState, Object state) { NSValue arg = WrapState(state); NSThreadLauncher launcher = new NSThreadLauncher(actionWithState); launcher.PerformSelectorInBackgroundWithObject(NSThreadLauncher.LaunchSelector, arg); }
/// <summary> /// Asynchronously invokes the action on a new thread and returns immediately. /// </summary> /// <param name="action">Action to invoke.</param> public static void StartNewThread(Action action) { NSThreadLauncher launcher = new NSThreadLauncher(action); launcher.PerformSelectorInBackgroundWithObject(NSThreadLauncher.LaunchSelector, null); }