blob: 4da33e7276a1a5d9c30d6b24552a834037f86fc6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package main
import (
"net/http"
"time"
"fmt"
"os"
// "runtime/debug"
)
func main() {
// debug.SetMaxThreads(2)
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
time.Sleep(5000000000)
fmt.Fprintf(w, "Hello, world!")
})
fmt.Printf("pid: %d\n", os.Getpid())
http.ListenAndServe(":8081", nil)
}
|