public WorkerThread(WorkerThreadFunc <Container> threadFunc, ThreadPriority?priority = null, string threadName = null) { _ThreadFunc = threadFunc; const int maxNameLength = 48; var tfn = _ThreadFunc.GetType().ToString(); if (tfn.Length > maxNameLength) { tfn = tfn.Substring(tfn.Length - maxNameLength, maxNameLength); } _ThreadName = threadName ?? String.Format("{0} {1:X8}", tfn, this.GetHashCode()); _Priority = priority; }
private void client_GetResult(DataTable dt) { WorkerThreadFunc workerThreadFunc = WorkerThread; workerThreadFunc.BeginInvoke(dt, EndWorkerThread, workerThreadFunc); }