private void TaskHandlerStatusChanged(object sender, TaskHandlerStatus status) { if (status == TaskHandlerStatus.Free) { DispatchTask(); CheckAllTaskComplte(); } }
public ComHandlerThread(Guid clsid, string data, int millisecondsTimeout, ComHandlerUpdate onUpdate, Action <int> onComplete) { objType = Type.GetTypeFromCLSID(clsid, true); Data = data; Timeout = millisecondsTimeout; status = new TaskHandlerStatus(i => { completed.Set(); onComplete?.Invoke(i); }, onUpdate); }