简体   繁体   English

Delegate.BeginInvoke线程

[英]Delegate.BeginInvoke Thread

I Know that Delegate.BeginInvoke() initiates the asynchronous call on a separate thread taken from the ThreadPool . 我知道Delegate.BeginInvoke()在从ThreadPool提取的单独线程上启动异步调用。 But i still have a confusion whether that thread must be always different from caller thread or both method can be on the same thread. 但是我仍然困惑于该线程是否必须始终与调用者线程不同或两个方法都可以位于同一线程上。

The function is called asynchronously (so it must be on a different thread). 该函数被异步调用(因此它必须在不同的线程上)。 You can execute something in between and possibly wait for the asynchronous operation to finish with EndInvoke. 您可以在两者之间执行某些操作,并可能等待E​​ndInvoke完成异步操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM