找到你要的答案

Q:What is difference between Thread.Join and waitHandle.WaitOne()?

Q:区别什么是线程。加入WaitHandle。waitone()?

Thread.Join and waitHandle.WaitOne(), both of them force the calling thread to wait. Until the thread has finished executing and until the waitHandle.Set() is called respectively.

But is there any difference between the 2 besides this?

线。加入WaitHandle。waitone(),两者力量调用线程等待。直到线程执行完成,直到WaitHandle set()叫做分别。

除了这2个之外还有什么区别吗?

answer1: 回答1:

...both of them force the calling thread to wait until the called thread has finished executing.

No, they don't. They are completely different.

WaitHandle.WaitOne will block the calling thread until the wait handle is signaled.

Thread.Join will block the calling thread until the thread object which the Join method is called is finished executing(terminated)

...both of them force the calling thread to wait until the called thread has finished executing.

不,他们不一样,他们完全不同。

WaitHandle.WaitOne将阻塞调用线程,直到等待信号。

连接将阻塞调用线程,直到连接方法调用的线程对象执行完毕(终止)

c#  multithreading