Skip to content

Instantly share code, notes, and snippets.

@tomsteele
Created November 17, 2014 15:55
Show Gist options
  • Save tomsteele/b7842cbf24cdd1b300b7 to your computer and use it in GitHub Desktop.
Save tomsteele/b7842cbf24cdd1b300b7 to your computer and use it in GitHub Desktop.
handwarmer.go
package main
import (
"runtime"
)
func main() {
n := runtime.NumCPU()
runtime.GOMAXPROCS(n)
for i := 0; i < n-1; i++ {
go func() {
for {
}
}()
}
for {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment