What is the difference between C # Thread.Sleep () and threadreference.Join ()?

What is the difference between C # Thread.Sleep () and threadreference.Join ()?

+3
source share
2 answers

Sleep is a method that pauses a thread for a certain period of time. It acts on one thread.

A connection is a method that pauses a thread until another thread terminates. It can be configured for endless sleep mode until this thread completes or within a finite period of time or until another thread completes. This is a synchronization method between multiple threads.

+11
source

. Join () , .

+5

Source: https://habr.com/ru/post/1724536/


All Articles