How can a background thread hang the UI thread?

后端 未结 4 1249
野性不改
野性不改 2021-01-13 09:00

I am using a background thread to initialize an instrument over USB. The UI hangs when I try to open the device. I would expect the background thread to pause when calling O

4条回答
  •  遥遥无期
    2021-01-13 09:36

    Does meter require running in an STA? Is the call to Open() actually being marshalled back to the UI thread for this reason?

    You can verify this is true by looking at the callstack of the hung UI thread in the debugger.

提交回复
热议问题