How to safely dispose of a WaitHandle?

后端 未结 0 1437
执念已碎
执念已碎 2021-02-12 18:47

Consider this code:

volatile EventWaitHandle waitHandle;

// Thread1, represents an IO-bound worker thread:
while (true) {
  waitHandle?.Set();
}

// Thread 2, re         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题