Neophyte here.

Concept help again, please. This all relates to Go.


http server waiting for requests...

http GET request comes in

... goroutine spins up

handler calls function which may call another function which ultimately 
services the GET request by providing a response (webpage) then returns.

goroutine spins down ...

http server waiting for requests...


Am I correct in thinking that the unique goroutine is active for the 
entirety of the connection session? Everything between the "goroutine spins 
up" and "goroutine
spins down" is handled in the one, single goroutine? That the concurrency 
is automatic at that point?

To carry the idea further...

Two (or a thousand) requests for the same webpage come in at about the same 
time. The http server spins up two (or a thousand) goroutines that are all 
active *and* insulated from each other for the duration of the GET-Response 
cycle.

Am I good in my thinking so far?

-- 
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/ac35f488-e846-418a-888b-2e2ddf0e1992%40googlegroups.com.

Reply via email to