Initial commit

This commit is contained in:
Yiyang Kang 2022-11-20 14:47:49 +08:00
parent 4966b5c117
commit a20bd674ab
3 changed files with 20 additions and 1 deletions

View File

@ -1,2 +1,11 @@
# singlethreaded # Usage
```go
import (
_ "git.gensokyo.cafe/go/singlethreaded"
// your other imports
)
```
Put the import on the top of the import list in your main package.

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.gensokyo.cafe/go/singlethreaded
go 1.19

7
lib.go Normal file
View File

@ -0,0 +1,7 @@
package singlethreaded
import "runtime"
func init() {
runtime.GOMAXPROCS(1)
}