go question about goroutines

145 views
Skip to first unread message

joe mcguckin

unread,
Jul 24, 2019, 4:18:07 PM7/24/19
to golang-nuts
I want to have some kind of server sitting a port and answering requests (Think HTTP or DNS). Can I tack on a AQMD client so that other software
can query the server regarding it's health or various runtime variables like # goroutines that are active, etc?

Does the AQMD client exist in it's own separate environment,  with separate goroutines?

If I have multiple go applications running, do they share the same runtime? Or does each one have it's own runtime and set of threads, etc.

Thanks,

Joe

B Carr

unread,
Jul 25, 2019, 9:21:30 AM7/25/19
to golang-nuts

I think the answer to this is No and Yes.

Jason E. Aten

unread,
Jul 27, 2019, 11:05:00 AM7/27/19
to golang-nuts
>Can I tack on a AQMD client so that other software can query the server regarding it's health or various runtime variables like # goroutines that are active, etc?

Certainly. Just listen on a separate port.

> Does the AQMD client exist in it's own separate environment,  with separate goroutines?
> If I have multiple go applications running, do they share the same runtime? Or does each one have it's own runtime and set of threads, etc.

Each process has one runtime with its own threads. The Go runtime is not shared across distinct processes.
Reply all
Reply to author
Forward
0 new messages