Initial commit
This commit is contained in:
parent
4966b5c117
commit
a20bd674ab
3 changed files with 20 additions and 1 deletions
11
README.md
11
README.md
|
|
@ -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
3
go.mod
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
module git.gensokyo.cafe/go/singlethreaded
|
||||
|
||||
go 1.19
|
||||
7
lib.go
Normal file
7
lib.go
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
package singlethreaded
|
||||
|
||||
import "runtime"
|
||||
|
||||
func init() {
|
||||
runtime.GOMAXPROCS(1)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue