I have a Polling thread which runs an infinite loop . and I have another thread(business) which is invoked by the UI thread based on user actions.
I need to raise an event in the polling thread from the business thread so that at the begining of the business thread (which is created by
the UI thread bcause of a user action - say Button click - ) the event is raised and the event needs to be raised inside the Polling thread which is executing some complex logic inside a loop and need to stop all of its operation temperorly
so that the business thread can continue its work and after it completes the polling thread can resume its work , I have done the synchronization using the lock state ment but since the logic inside the loop of the polling thread is complex and takes
time to complete each iteration , I need to stop the polling threads exection at the exact moment the business thread starts its execution - two threads share some common hardware devices .
Is there any way to do this in .Net
View Complete Post