protected override void MeshThreadEntryPoint(AbstractThreadedMesh threadParamObj) { //Message loop while (isActive) { CheckInputQueue(); } }
protected override void MeshThreadEntryPoint(AbstractThreadedMesh threadParamObj) { _rank = 1; //Default dimensions (currently 1, since we don't have metric defined yet for edb terms) parser = new CSVAnalyser(this); ReadInput(); while (isActive) { Thread.Sleep(10); } }
protected override void MeshThreadEntryPoint(AbstractThreadedMesh threadParamObj) { _rank = 3; //Default dimensions (3) //Message loop. while (isActive) //Message loop { Thread.Sleep(5000); ProcessNodeQueue(newNodeQueue); } }
/// <summary> /// Provides catching top-level exceptions from the thread, so that the application doesn't crash /// when specific thread doesn't catch all it's exceptions. /// </summary> /// <param name="threadParamObj">Object from ParametrizedThreadStart. It is ourselves, actually.</param> private void DefaultSafeThreadStarter(object threadParamObj) { try { string className = GetType().Name; LoggerSAP.Log("{0} ({1}) thread was born.", Thread.CurrentThread.Name, className); Thread.Sleep(2); //Wait for the framework to initialize 'this' object. Without this wait, members assigned to in constructor may not be initialized. AbstractThreadedMesh param = (AbstractThreadedMesh)threadParamObj; MeshThreadEntryPoint(param); LoggerSAP.Log("{0} ({1}) thread has died.", Thread.CurrentThread.Name, className); } catch (Exception ex) { LoggerSAP.Log("The '{0} thread didn't catch its exception. The thread has died. Exception message: {1}.", Thread.CurrentThread.Name, ex.Message); } }
abstract protected void MeshThreadEntryPoint(AbstractThreadedMesh threadParamObj);