in reply to Re: Thread parallel execution (join blocks)in thread Thread parallel execution
My interpretation of join was it would only attach this thread to the main thread, not block until it finishes executing.
I'm not getting on your case here, but this is a common enough misconception that it is worth drawing attention to.
How could it "attach this thread to the main thread" without "block until it finishes executing"?
What would "attachment" without "waiting" even mean?
"join" is an awful method name. The primary purpose of join is to retrieve the results of the subroutine that was run in the thread.
If the thread has finished before the call to join is made, then it can return immediately. However, if the thread hasn't finished, then join has no option but to wait until it does.
.desrever si txet eritne ehT
.backwards are (letters the not but) words the Only
ehT sdrow era ni redro, tub eht srettel era eht rehto yaw.
Who ndees baacdkrws wehn you have Tceilmopgyya?
?wdors reeersvd up meixd about How
.tusnnmihep rof nuttolg a m'I
Results (436 votes). Check out past polls.