NotSupportedException on WaitHandle.WaitAll

后端 未结 3 1830
名媛妹妹
名媛妹妹 2021-01-19 07:17

I am trying to execute the following code. The code tries to parallely download and save images. I pass a list of images to be downloaded. I wrote this in C# 3.0 and compile

3条回答
  •  没有蜡笔的小新
    2021-01-19 07:59

    Have you tried setting the apartment state for the thread?

    thread.SetApartmentState (System.Threading.Apartmentstate.MTA );
    

提交回复
热议问题