/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="evArgs"></param> protected virtual void OnAborted(object sender, ComputeCommandStatusArgs evArgs) { logger.Info("Abort " + Type + " operation of " + this + ".", "Information"); if (aborted != null) { aborted(sender, evArgs); } }
private void StatusNotify(CLEventHandle eventHandle, int cmdExecStatusOrErr, IntPtr userData) { status = new ComputeCommandStatusArgs(this, (ComputeCommandExecutionStatus)cmdExecStatusOrErr); switch (cmdExecStatusOrErr) { case (int)ComputeCommandExecutionStatus.Complete: OnCompleted(this, status); break; default: OnAborted(this, status); break; } }
private void Cleanup(object sender, ComputeCommandStatusArgs e) { lock (CommandQueue.Events) { if (CommandQueue.Events.Contains(this)) { CommandQueue.Events.Remove(this); Dispose(); } else { FreeGCHandle(); } } }
private void Event_Completed(object sender, ComputeCommandStatusArgs args) { Mres.Set(); }