Top "Goroutine" questions

A goroutine is a lightweight thread of execution that is managed by the Go language runtime.

golang methods that will yield goroutines

As far as I can understand, goroutines will block other goroutines from running if they are too busy. For me, …

go goroutine
Explain: Don't communicate by sharing memory; share memory by communicating

I wonder what is the most down to earth explanation of this famous quote: Don't communicate by sharing memory; share …

go memory channel goroutine
How does Golang share variables between goroutines?

I'm learning Go and trying to understand its concurrency features. I have the following program. package main import ( "fmt" "sync" ) …

multithreading go concurrency goroutine
Close multiple goroutine if an error occurs in one in go

consider this function : func doAllWork() error { var wg sync.WaitGroup for i := 0; i < 2; i++ { wg.add(1) go func() { defer …

go error-handling synchronization exit goroutine
Stop goroutine execution on timeout

I want to stop goroutine execution on timeout. But it seems like it is not working for me. I am …

go goroutine go-iris
golang: goroute with select doesn't stop unless I added a fmt.Print()

I tried the Go Tour exercise #71 If it is run like go run 71_hang.go ok, it works fine. However, …

select go channel goroutine
Which of coroutines (goroutines and kotlin coroutines) are faster?

Kotlin corutines is sugar for finite state machine and some task runner (for example, default ForkJoinPool). https://github.com/Kotlin/…

go kotlin coroutine goroutine kotlin-coroutines
Go project's main goroutine sleep forever?

Is there any API to let the main goroutine sleep forever? In other words, I want my project always run …

go blocking goroutine
Is there some elegant way to pause and resume any other goroutine?

In my case, I have thousands of goroutines working simultaneously as work(). I also had a sync() goroutine. When sync …

go channel goroutine
Python-style generators in Go

I'm currently working through the Tour of Go, and I thought that goroutines have been used similarly to Python generators, …

go generator goroutine