WaitAll for multiple handles on a STA thread is not supported

前端 未结 5 1776
猫巷女王i
猫巷女王i 2020-12-03 00:36
  1. Why do I get this error message? \"WaitAll for multiple handles on a STA thread is not supported.\"
  2. Should I use [MTAThreadAttribute] attribut? Update
5条回答
  •  执笔经年
    2020-12-03 01:13

    Actually I use the following to replace WaitHandle.WaitAll(doneEvents);

    foreach (var e in doneEvents)
        e.WaitOne();
    

提交回复
热议问题