In C#, wait on the mainthread while continuing to process UI updates? (.NET 2.0 CF)

前端 未结 10 2178
梦谈多话
梦谈多话 2020-12-18 11:49

I want to otherwise block code execution on the main thread while still allowing UI changes to be displayed.

I tried to come up with a simplified example version of

10条回答
  •  一整个雨季
    2020-12-18 12:25

    structure your app so that the main thread only performs UI updates, and all other work is done on secondary threads via a work queue; then add a waiting-for-godot flag to your main thread and use it to guard the method that adds items to the work queue

    out of curiosity: why do you want to do this?

提交回复
热议问题