On Wed, Jul 24, 2019 at 12:37 PM B Carr <buc...@gmail.com> wrote:
>
> Neophyte here.
>
> Concept help again, please. This all relates to Go.
>
>
> http server waiting for requests...
>
> http GET request comes in
>
> ... goroutine spins up

Overall your understanding is correct, with the minor detail that the
server continues waiting right after the gorutine 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?

If that handler goroutine doesn't start others, then that's correct. I
don't understand what you mean by "concurrency is automatic".

>
> 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?

Correct.

>
> --
> 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.

-- 
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/CAMV2RqpXMb4bXLG_EkWC7qLBh-gQuNf%2BpV11r_v%2BDN4%2BEWCcOg%40mail.gmail.com.

Reply via email to