Skip to content

Instantly share code, notes, and snippets.

@dcorto
Created July 14, 2024 19:52
Show Gist options
  • Save dcorto/8e24d636447d45389ec9781603a8942a to your computer and use it in GitHub Desktop.
Save dcorto/8e24d636447d45389ec9781603a8942a to your computer and use it in GitHub Desktop.
concurrency preempt
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