.NET: How to have background thread signal main thread data is available?

后端 未结 7 1970
终归单人心
终归单人心 2021-02-14 04:54

What is the proper technique to have ThreadA signal ThreadB of some event, without having ThreadB sit blocked waiting for an e

7条回答
  •  囚心锁ツ
    2021-02-14 05:21

    If you use a backgroundworker to start the second thread and use the ProgressChanged event to notify the other thread that data is ready. Other events are available as well. THis MSDN article should get you started.

提交回复
热议问题