public static ActionDispatcherSchedulerHandle StartOnNewThread() { ActionDispatcherSchedulerHandle res = null; // ReSharper disable once AccessToDisposedClosure using (var resetEvent = new ManualResetEvent(false)) { new Thread(o => BotServices.RunDispatcher(d => { res = new ActionDispatcherSchedulerHandle(); resetEvent.Set(); })) { IsBackground = true }.Start(); resetEvent.WaitOne(); } return(res); }
public void CaptureScheduler() { this.SetScheduler(BotServices.GetScheduler()); }
public BotBitsClient() : this(BotServices.GetScheduler()) { }