Skip to content

Commit 9d8234c

Browse files
committed
all: documentation
1 parent 3a8e6bf commit 9d8234c

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
# mkill
22

3-
mkill limites the number of threads in a Go program
3+
mkill limits the number of threads in a Go program
4+
5+
## Usage
6+
7+
```
8+
mkill.GOMAXTHREADS(50)
9+
```
10+
11+
## License
12+
13+
MIT © Changkun Ou

mkill.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var (
1515
pid = os.Getpid()
1616
maxThread = int32(runtime.NumCPU())
1717
interval = time.Second
18-
debug = true
18+
debug = false
1919
)
2020

2121
func checkwork() {
@@ -57,7 +57,7 @@ func init() {
5757
}()
5858
}
5959

60-
// GOMAXTHREADS change the limites of the maximum threads in runtime
60+
// GOMAXTHREADS change the limits of the maximum threads in runtime
6161
// and returns the previous number of threads limit
6262
func GOMAXTHREADS(n int) int {
6363
return int(atomic.SwapInt32(&maxThread, int32(n)))

0 commit comments

Comments
 (0)