I have intentionally set a max limit on the number of threads which can be 
spawned by my Go program to be 1 and the Go runtime errors out that it 
exceeds 1-thread limit.
I've checked the entire code of runtime but couldn't find how the minimum 
threshold of threads to be spawned is decided. Any pointers?

```
*package main*

*import (*
*"fmt"*
*"runtime/debug"*
*)*

*func main() {*
* debug.SetMaxThreads(1)*
* fmt.Println("Hello world!")*
}
```



-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3c14a0f8-7363-4183-9b0d-781d72e6ef8fn%40googlegroups.com.

Reply via email to