You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure what a sentence in the FAQ entry on goroutines is trying to say. Noting it
here so that I don't forget about it.
"The result, which we call goroutines, can be very cheap: unless they spend a lot
of time in long-running system calls, they cost little more than the memory for the
stack, which is just a few kilobytes."
Why does it matter whether a goroutine spends a lot of time in a long-running system
call? I don't see why that changes the cost one way or another. I can see a suggestion
that making a lot of system calls can be expensive, but why "long-running system
calls?"
The text was updated successfully, but these errors were encountered:
The idea here was to hint that a million outstanding system calls means a million
outstanding kernel contexts held as threads. That's no longer true to the same extent
but I don't know how to explain the situation clearly in a way that does not require
constant maintenance.
Maybe weaken to:
The result, which we call goroutines, can be very cheap: they cost little more than the
memory for the stack, which is just a few kilobytes.
I think I understand the warning now. Maybe something along the lines of
"The result, which we call goroutines, can be very cheap: they cost little more than the
memory for the stack, which is just a few kilobytes. A goroutine is much cheaper than a
system-call that creates an OS thread (unless, of course, your goroutine launches a
system call)."
Forgive me if that is not correct; I don't have detailed knowledge on the subject.
The text was updated successfully, but these errors were encountered: