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.
source
share