Created
July 14, 2024 19:52
-
-
Save dcorto/8e24d636447d45389ec9781603a8942a to your computer and use it in GitHub Desktop.
concurrency preempt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
ch := make(chan bool) | |
go func() { | |
for { | |
} | |
}() | |
go func() { | |
fmt.Println("hello") | |
}() | |
<-ch | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment