Will the number of OS threads spawned by a golang process never decrease?

124 views
Skip to first unread message

varun...@gmail.com

unread,
Sep 19, 2019, 11:26:39 AM9/19/19
to golang-nuts
Consider a golang program running on a system with GOMAXPROCS value 10. Initially OS has spawned 10 threads for execution. Due to blocking system calls, OS spawns 30 more threads resulting in 40 OS threads attached to the process.After all the blocked system calls return, then will the process still be having 40 OS threads? If yes, then can we conclude that the number of OS threads mapped to a golang process can grow but never comes down? 

Thanks,
Varun

Varun V

unread,
Sep 19, 2019, 1:25:36 PM9/19/19
to golang-nuts
I tried to post this message before I came across https://github.com/golang/go/issues/14592. I couldn't post it successfully then. I don't know why this message is posted now

Ian Lance Taylor

unread,
Sep 20, 2019, 12:52:02 AM9/20/19
to Varun V, golang-nuts
On Thu, Sep 19, 2019 at 10:25 AM Varun V <varun...@gmail.com> wrote:
>
> I tried to post this message before I came across https://github.com/golang/go/issues/14592. I couldn't post it successfully then. I don't know why this message is posted now

As it says at https://groups.google.com/forum/?pli=1#!forum/golang-nuts:
"Note: This group is moderated. If you are a first-time poster it may
take 24 hours for your post to appear in the group."

Sorry for the confusion.

Ian
Reply all
Reply to author
Forward
0 new messages