I'm trying to do simple thread and stop functionnalities.
I start / stop serveral time the thread, sometimes the thead doesn't consider the global variable that tells the thread to stop
Don't know if it helps but my Thread fire an event handle into the same class.
Don't know how to include my project to this topic so I will copy-paste the essential of the problem
======================================================== #region Member variables and Event public System.Threading.Thread mThreadAcquire; public bool mAcqThreadIsRunning = false; public System.Threading.Mutex mAcqThreadRunning;
public delegate void OnData(long aData); public event OnData OnDataExecute; #endregion