Does BeginInvoke() run a separate thread?

后端 未结 3 1258
有刺的猬
有刺的猬 2021-01-02 08:41

In my WPF application, I want to do some work in a non-UI thread so as to avoid the UI from become not-responding. For that I did this:

var caller = new Asyn         


        
3条回答
  •  情歌与酒
    2021-01-02 09:05

    It uses the thread pool - so it won't necessarily create a new thread, but it runs in a different thread to the calling thread (unless that's a thread pool thread itself which happens to finish its task before the delegate invocation is scheduled; it would be pretty unlikely to use the same thread).

提交回复
热议问题