protected virtual void OnBgProccess(BgTask t) { switch (t.eType) { case BgTask.bgTaskType.DP_BG_SEARCH: var tsk = (srchTsk)t.data; m_dataContent.Search(tsk.m_exprs, tsk.m_srchParams); break; } }
public void qryBgTask(BgTask task, bool bResume = false) { Debug.WriteLine("[qryBgTask] {0}", task.eType.ToString()); m_msgQueue.Enqueue(task); #if none_stop #else if (bResume && !m_WorkerIsRunning) { m_worker.RunWorkerAsync(); } #endif }
protected virtual void OnBgProcess(BgTask task) { Debug.WriteLine("OnBgProcess " + task.eType.ToString()); if (task.eType == BgTask.bgTaskType.NOOP) { //sleep sleep((int)task.data); return; } if (mBgProcess != null) { mBgProcess.Invoke(this, task); } }
private void M_wkr_BgProcess(object sender, myTask e) { BgTask t = (BgTask)e; if (t == null) { return; } if (t.receiver != ("DP," + m_tblName)) { return; } OnBgProccess(t); }