Goroutines - Go Lang Practical Programming Tutorial p.18

preview_player
Показать описание
Welcome everyone to part 18 of the Go Language programming tutorial series, where we'll be talking about concurrency in Go. First, let's acknowledge what concurrency is, and what it isn't. Concurrency is dealing with multiple things at once, and it is not actually doing multiple things simultaneously (parallelism).

Рекомендации по теме
Комментарии
Автор

This guy is actually amazing! I've never thought of the situation when the main thread end before others. Many many thanks !

tiennguyenhoang
Автор

From FAQ on Go:
Why doesn't my multi-goroutine program use multiple CPUs?
The number of CPUs available simultaneously to executing goroutines is controlled by the GOMAXPROCS shell environment variable. In earlier releases of Go, the default value was 1, but as of Go 1.5 the default value is the number of cores available. Therefore programs compiled after 1.5 should demonstrate parallel execution of multiple goroutines. To change the behavior, set the environment variable or use the similarly-named function of the runtime package to configure the run-time support to utilize a different number of threads.

Programs that perform parallel computation might benefit from a further increase in GOMAXPROCS. However, be aware that concurrency is not parallelism.

MrZKaiser
Автор

Such a cliffhanger! I don't even need go for anything, still mad..

maxim
Автор

my boy hammbers that spacebar so hard haha.

ChristopherFranko
Автор

add
fmt.Scanln()
at the end of the main func to have the logs

mrt
Автор

for the case: go say("Hey"); say("There"), the output is "There, Hey, There, Hey, There, Hey". Why do we see the last "Hey"? Should'nt the program end after the last "There"?

serdarbaykan
Автор

it would be interesting if we use Django or Flask to build an resp API and use Go to call and do something with it

shanghaifoodie
Автор

if a method changed to go routine, will that thread become even parallel to main() method too. As per the main() block, everything should first run inside the main() first ? Please elaborate.

dp
Автор

Almost left the video when I saw the Python logo

manofqwerty
Автор

Also I was checking a way we could dump out methods from a type, but I've stuck with a scenario where I have one method associated with a struct and unable to dump it out. Could you help..

sammy
Автор

5:49 why there is last "hey" when program should finish when last "there" is printed?

nonejm
Автор

i can see your video running in go routine and sound is on mainthread

jayakrishnannair
Автор

Almost left the video when I saw the Python lo

manofqwerty
Автор

I am working kivy now. Don't you think julia programing? I want to learn what is julia legend.

Автор

Too bad it doesn't say or recird how long the function took

sharoyveduchi
Автор

i have a question for a prohect, have you a email to contact for a suggestions?

ico
Автор

This reminds me of coroutines in lua
Only a little different + G instead of C lol

omiyodranawa
visit shbcf.ru