Hello and welcome to the golden programming language course in this session.
We want to talk about the others concurrency concept.
Main goal, pretty.
The main function in the main package is the main goal written on go routines are started from the main
goal routine.
These go routines can then assault multiple on a regular routine and so on.
The main goal routine represents the main program.
Once it exists, then it means that the program has exited goal routines don't have parents or children.
When you start to go routines, it just executes alongside all other running goal routines.
Its goal routines exist only when its function returns.
The only exception to that is that old goal routines exceed when the main goal routine exists.
Now, let's go to this code program to demonstrate that goal routines don't have parents or children.
First defined two functions like Halo one and Halo two, Funk Halo one, and defining a statement like
FP and Go Routine one and define another function like Halo three, find and Low two and set to statement
for response like RFP
in the routine to
now call Halo to function in Halo one function as go routine.
So go to the Halo one function.
Go Halo two.
Now go to the main function and cognitive function is go routine, go to the main function and calling
Hello, one has gold.
Right, some other statements like AFP.
Hello.
And put sleep time like time to sleep
and set while my application time got sick.
And again, another message is go to the next line and if to, for example, goodbye.
Reformat the quote, save the process and execute the program.
Go round back.
Let me go
now we can see the output.
Hello, in-goal routine one, you can go routine two and goodbye in the above program, the first go
routine source and preens in go routine one and then exists the second goretti and then source and proteins
in go protein to its shows that go proteins don't have parents or children, and they exist as an independent
execution in order not to prolong the time of decision.
We will finish it and we will continue the content in the next session until next session.
Goodbye.