The origin of the thread compound

Almost all programming languages ​​that support threads have a join method. I understand what join does, but would like to know what the origin behind the naming is? Would the name finish be more appropriate?

+4
source share
3 answers

Thread A and Thread B did different things, and now they are going to reunite, because their results must be exchanged - they will join each other, continue and, in the end, split again.

+3
source

I think this comes from the analogy of execution paths. The program execution path was split into two separate paths when the thread was spawned, and now you want the two paths to connect to each other again in the same path.

+4
source

As I understand / interpret it (although I correct it if I am mistaken), threads of execution should contribute to one common task (if there is no interaction between threads, then they can also be separate processes after all one of the main points of the thread is to overcome the communication barrier between processes). Therefore, it seems logical that subtasks depart from the general task, and then re-join at a later point, instead of reaching a dead end. Also, seeing that when a thread is created, some of its parent resources are allocated to it, even if the thread does not return a value, it should still return what it gave in the first place, thus merging or “connecting” to the original thread.

+2
source

All Articles