Golang Goroutine Basics You MUST Learn! | Golang Concurrency EP1

preview_player
Показать описание
Golang Goroutine Basics You MUST Learn! | Golang Concurrency EP1
Golang Concurrency Series, Episode 1: In today's Golang tutorial video, we will talk about the GoRoutines in the Go programming language. We will learn how to implement GoRoutine, when and how it is used in Go/Golang, and everything you need to know about the basics of GoRoutine to fully understand Concurrency in Go. Enjoy!

--
Golang Dojo is all about becoming Golang Ninjas together. You can expect all kinds of Golang tutorials, news, tips & tricks, and my daily struggles as a Golang developer. Make sure to subscribe if you look forward to such content!

--
Timestamps
0:00 Intro
01:13 Setup
03:45 GoRoutines
06:04 Outro

--
#golang #goprogramming #golangdojo
Рекомендации по теме
Комментарии
Автор

I _love_ the premise here with the Evil Ninjas! I laughed out loud a few times!

Can't wait to see how you tackle channels!

c__beck
Автор

this is the best explanation i have found on youtube. thank you very much

egpxgff
Автор

Hey dude, I really like this kind of short video. This is very well explained and easy to understand. Keep doing it :)

diegoparraca
Автор

great video! I have watched many programming videos in the past and this is my first time ever commenting on learning video.

Sonia-gczz
Автор

Very well explained with lively example. I also like the time measurement. 😀

Philantrope
Автор

nice one. Looking forward for more <3

ranilmadawalage
Автор

Pretty great and intuitive example a& explanation! Thank you

murcielago_software
Автор

The sleep func in the task go routine should in the previous position than that printing "throwing ninja stars.." line for better understanding. Loved the simple way of presentation anyway

fujinafiul
Автор

I'm marathoning your videos. Awesome material!

By the way, I thought you would use the name of the ninja turtles as an example. :)

sestremADB
Автор

Hey, thanks for the video!
Is there a cleaner way to sleeping for a couple of seconds to ensure that all go routines stopped running?

So, something like a join() from other programming languages?

papyrus
Автор

I'm finding it hard to learn golang, most of the words and phrases used to describe a particular function sounds too "low level" for me to grasp

abiodun
Автор

It seems like promise.all() in javascript right?

saleumsack
Автор

i am confused as to how the deferred `time.Since` knows to be called after the go routines have finished, but doesn't wait the 2 seconds for the main function to exit!

manfrombritain
Автор

What’s the purpose of a...: in your fmt in the attack function?

niklo
Автор

bro, video seemed really interesting, but it is hard to listen your way of speaking

advenn
Автор

package main

import (
"fmt"
"time"
)

func main() {

start := time.Now()
defer func() {

}()

evilNinjas := []string{"Tommy", "Johnny", "Bobby", "Andy"}
for _, evilNinja := range evilNinjas {
go attack(evilNinja)
}
time.Sleep(time.Second * 2)
}

func attack(target string) {
fmt.Println("Throwing ninja stars at", target)
time.Sleep(time.Second)
}

kvelez
Автор

Hey great video. Hopefully I'm not telling you something you already know but in this context you would say "in this series" as opposed to "in this serie".

yarrowification
Автор

don't use this type of motion background. I'ts actually distracting

sethukumar
Автор

You seem good but your English is getting on my nerves

armans