What is the proper technique to have ThreadA signal ThreadB of some event, without having ThreadB sit blocked waiting for an e
If your "main" thread is the Windows message pump (GUI) thread, then you can poll using a Forms.Timer - tune the timer interval according to how quickly you need to have your GUI thread 'notice' the data from the worker thread.
Remember to synchronize access to the shared List<>
if you are going to use foreach
, to avoid CollectionModified
exceptions.
I use this technique for all the market-data-driven GUI updates in a real-time trading application, and it works very well.