[go-nuts] HandleFunc pattern question

2023-02-17 Thread Joe McGuckin
I'm going to want to handle URL's with no trailing suffix (e.g. foo.com/ or 
just foo.com) as well as URL's with a suffix (foo.com/plugh). I don't want 
to register a function for every possible URL suffix - I want to have two 
functions: one for the URL with no trailing suffix and once for any URL 
with a suffix.

How do I supply a pattern to HandleFunc that will differentiate between the 
two? The Docs say that a pattern of '/' will match anything, So, that's not 
quite what I want.

Thanks.

Joe

-- 
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/f20800d5-4f5e-4913-ae5c-1dffbe0b252cn%40googlegroups.com.


Re: [go-nuts] $GOPATH/go.mod exists but should not

2021-01-10 Thread 'JOE MCGUCKIN' via golang-nuts
OK, I was doing everything in the ~/go directory. I assumed that 'go get’ 
would create the appropriate directories under go/src.

I have not followed your example yet, but I suspect that’s my problem.

Thanks!

Joe

> On Jan 10, 2021, at 5:24 PM, Rick  wrote:
> 
> I'm not entirely following what you are doing. But here are some comments. 
> You have a directory $HOME/go, the contents of which look like what you would 
> see under $GOPATH. If you are going to create a project under $HOME/go 
> (whether GOPATH is defined or not), the suggested place to put it is in 
> $HOME/go/src/urlShortener or perhaps 
> $HOME/go/src/github.com/yourID/urlShortener. Having said that, using the same 
> version of Go I am able to do the following without error:
> 
> unset GOPATH
> cd /tmp
> mkdir urlShortener
> cd urlShortener
> go mod init urlShortener
> go get github.com/fasthttp/router
> etc...
> 
> Works for me.
> On Sunday, 10 January 2021 at 16:59:55 UTC-8 joseph.p...@gmail.com wrote:
> I found (what I think is) a simple GO project to play with as a learning 
> exercise:
> 
>
> https://intersog.com/blog/how-to-write-a-custom-url-shortener-using-golang-and-redis/
>  
> 
> 
> The second step fails immediately. with the aforementioned error message.
> 
> I'm using GO version 1.15.6
> $GOPATH is undefined.
> Here's the content of ~/go
> Joes-iMac:go joe$ pwd
> 
> /Users/joe/go
> 
> Joes-iMac:go joe$ ls
> 
> bin go.mod pkg src
> 
> Joes-iMac:go joe$ more go.mod
> 
> module urlShorter
> 
> 
> 
> go 1.15
> 
> [eof]
> 
> So, I googled for the error message. I find lots of hits, but no clear 
> explanation of why the error message, but most importantly, no clear 
> explanation of how to fix...
> 
> Help please!
> 
> Thanks,
> 
> Joe
> 
> 
> -- 
> 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/f0b5be67-a41d-4953-b65a-102309a232d4n%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/ADAE81A4-828E-4C26-9693-6905EF80D7D3%40icloud.com.


[go-nuts] Pointers to allocated memory objects?

2020-07-17 Thread joe mcguckin
Do pointers have to point to the beginning of a heap object or can they 
point to the interior of the object? 

Thanks,

Joe

-- 
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/67380fb0-4677-471a-8fce-fb7073ff0a07o%40googlegroups.com.


[go-nuts] Go, git and github questions

2020-06-27 Thread Joe McGuckin
1). When I use ‘go get’ to download some source code from github, is the 
src directory a regular ‘git’ directory?

2).i want to download some go code from github and make a bunch of local 
changes. Just ‘go get’ and start editing? Nothing else I need to do?

Thanks

-- 
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/25657915-2398-4f5b-b512-4a19d7821eaco%40googlegroups.com.


Re: [go-nuts] chan chan question

2020-06-22 Thread joe mcguckin
Thanks!


>>

-- 
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/c5fc7adb-c08a-4a18-946e-d2c009b53a94o%40googlegroups.com.


[go-nuts] chan chan question

2020-06-22 Thread joe mcguckin
I've been playing with this example code on the 
playground: https://play.golang.org/p/4l57Hqw9CLJ

In func  'goroutine':

   select {
case errChan := <-requestChan:

How does this work? Does a channel send its name? Is 'errChan' some sort of 
special symbol?

-- 
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/47d6fc3a-3f94-4661-b111-7c8fecb791d8o%40googlegroups.com.


Re: [go-nuts] Re: GO on multi-processor systems

2020-06-11 Thread joe mcguckin
Yes, of course they have internet connections, but I don't run 
virtualization software. It's my understanding that most of these 
bugs have to do with information leaking from one process or VM to another 
or with a process trying to escape from it's user process into a higher 
privileged one.  If simply being connected to the internet is risky enough 
that your machine can be compromised, there's more of a problem here than a 
cpu bug.

On Thursday, June 11, 2020 at 1:46:45 AM UTC-7, Kevin Chadwick wrote:
>
> >Actually, I'd like to turn off all the cpu bug fixes (e.g. row hammer). 
> > 
> >It's my understanding that there is a significant performance penalty 
> >and I 
> >don't share my machines 
> >with anyone else, so I'm not concerned with information leaking between 
> > 
>
> It is likely more dangerous, than you realise. So they don't receive any 
> data from the Internet? 
>

-- 
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/3fb303ba-0512-4928-982b-ef45edebac9fo%40googlegroups.com.


Re: [go-nuts] Re: GO on multi-processor systems

2020-06-10 Thread joe mcguckin
Actually, I'd like to turn off all the cpu bug fixes (e.g. row hammer). 
It's my understanding that there is a significant performance penalty and I 
don't share my machines
with anyone else, so I'm not concerned with information leaking between 
processes.

Joe

On Wednesday, June 10, 2020 at 3:01:20 PM UTC-7, Kevin Chadwick wrote:
>
> >> What about where there are multiple cpus?  My servers have 2, 6 core 
> >> Xeons. With hyper threading, it looks like 24 cores available to 
> >Linux. 
>
> I know the latest issues also affect hyper threading/SMT but you shoukld 
> consider switching it off or using AMD, if you care about security. OpenBSD 
> was proven right in that regard and yet Linux still kept it 
> insecure/enabled, by default!!! 
>

-- 
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/b760915d-7717-4db2-bbf2-34111596d2e2o%40googlegroups.com.


[go-nuts] GO on multi-processor systems

2020-06-10 Thread joe mcguckin
I read somewhere that the default # of GO threads is the number of cores of 
the cpu.

What about where there are multiple cpus?  My servers have 2, 6 core Xeons. 
With hyper threading, it looks like 24 cores available to Linux.

Will the GO scheduler schedule GO routines on both CPU's?

If the scheduler is running on one core, how does it manage to put GO 
routines on other cores and/or CPU's? Does it create system threads (or 
pthreads) on each of the other 
cores and CPU's? Can it pin a thread to a specific core, or are you at the 
mercy of the OS thread scheduler?

Inquiring minds want to know...

Thanks,

Joe

-- 
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/54e11b33-5c76-4eed-ae34-76a41f20f781o%40googlegroups.com.


[go-nuts] Can someone please explain http.HandlerFunc() ?

2020-04-03 Thread joe mcguckin
I see some code like:

   
  r.NotFoundHandler =http.HandlerFunc(notfound)

Where notfound() has the signature of 

  func notfound(w http.ResponseWriter, r *http.Request)

What is HandlerFunc() doing? It’s not a function. Is it some sort of type 
coercion or casting?

I can see how casting that might work with simple values (e.g.numbers,integers, 
etc)  but functions?

The web docs say:
The HandlerFunc type is an adapter to allow the use of ordinary functions 
as HTTP handlers. If f is a function with the appropriate signature, 
HandlerFunc(f) is a Handler that calls f.

If notfound() is ' func notfound(w http.ResponseWriter, r *http.Request)’, what 
is it being converted into?

Why is this needed?

Thanks,

Joe

-- 
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/C594C073-3DF8-4CD1-8C43-59AE59AADF92%40via.net.


[go-nuts] Sync.wait()?

2020-02-10 Thread Joe McGuckin
Various sources say wait() waits until the internal counter reaches zero. 
Does it cause a real pause (e.g.: control passing to another goroutine?) 
Looking at the code, it just seems to loop endlessly waiting for the 
counter to reach zero. Is that somehow optimized away? Sitting in a tight 
loop waiting for a bunch of goroutines to exit seems like a waste of 
machine cycles...

Joe

-- 
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/4698ca4b-530e-4314-bd5d-c76a89e19a1a%40googlegroups.com.


[go-nuts] Question about 'import' statement

2020-02-03 Thread joe mcguckin
Do all the files listed in the 'import' statement get pulled in and 
compiled, or merely scanned to resolve function references etc.

As someone who grew up on 'C', it seems a bit weird to not have an 
'include' mechanism and its headers.

Does the it matter what order the files appear in the import clause?

Thanks,

joe

-- 
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/6c63ed3c-a8d8-4b40-879b-725c1a440635%40googlegroups.com.


[go-nuts] Channels question

2019-09-29 Thread Joe McGuckin
If i have multiple goroutines listening on the same channel, then write 
something to the channel, will all goroutines receive the value, or only the 
‘next’ available goroutine (as determined by the scheduler)

Thanks,

Joe

-- 
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/faf1bb47-23f7-4d05-8655-017171a45279%40googlegroups.com.


Re: [go-nuts] HTTP:ListenAndServe questions

2019-09-23 Thread joe mcguckin
Thanks!

That clears up a couple of nagging questions I had.

Joe

On Monday, September 23, 2019 at 7:45:16 PM UTC-7, Ben Burwell wrote:
>
> On Mon Sep 23, 2019 at 5:50 PM joe mcguckin wrote: 
> > In ListenAndServe, I see that it calls (*Server).Serve(ln), then 'go 
> c.serve(ctx)' 
> > I can't find a function named 'serve'. Where is this? 
>
> On line 1760 of the same file, server.go. 
>
> > Does HTTP manage a pool of coroutines or does it create one for every 
> > incoming HTTP request. 
>
> A new goroutine is created to handle each connection from the listener. 
>
> > It's clear where the first request gets handled 
> > but where do subsequent requests get handled? 
>
> Subsequent requests get handled in the same manner. Note that `go 
> c.serve(ctx)` is in a loop which blocks waiting for a new connection 
> (with `l.Accept()`). Once the goroutine has been dispatched to handle 
> the request, the main goroutine returns to waiting for the next request. 
>

-- 
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/f839acf3-c388-480e-b3a0-35da08424037%40googlegroups.com.


[go-nuts] HTTP:ListenAndServe questions

2019-09-23 Thread joe mcguckin
In ListenAndServe, I see that it calls (*Server).Serve(ln), then 'go 
c.serve(ctx)' 
I can't find a function named 'serve'. Where is this?

Does HTTP manage a pool of coroutines or does it create one for every 
incoming HTTP request. It's clear where the first request gets handled
but where do subsequent requests get handled?

Thanks,

Joe

-- 
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/c975193a-7b69-4ba2-ad99-3499cf01d726%40googlegroups.com.


[go-nuts] Is there a document that explains the inner workings of net/HTTP?

2019-09-22 Thread Joe McGuckin

I’m looking through this code, trying to understand the flow through the code 
starting with ListenAndServe(). Besides going through the code, is there a 
document that provides a concise explanation of what’s going on?

Thanks,

Joe

-- 
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/16f2eec4-53ed-4a12-8514-2d3bdd87dfdc%40googlegroups.com.


Re: [go-nuts] Re: How to build gollvm on arm platform

2019-09-18 Thread joe mcguckin
Ian,

What's the advantage of an LLVM based compiler. GC seems to be fast and 
makes OK code. Is the llvm toolchain that much better?

joe


On Wednesday, September 18, 2019 at 5:08:16 PM UTC-7, Ian Lance Taylor 
wrote:
>
> On Wed, Sep 18, 2019 at 5:02 PM joe mcguckin 
> > wrote: 
> > 
> > What's the difference between the standard GO compiler and GOLLVM? 
>
> The standard Go compiler, also called the gc compiler, is written 
> entirely in Go.  GoLLVM is written in C++ and uses the LLVM backend. 
>
> > I thought there was an llvm based compiler that was abandoned? 
>
> I don't know just how abandoned is, but it's true that there are two 
> Go compilers based on LLVM: llgo and GoLLVM.  GoLLVM is under active 
> development.  I'm not sure what the status of llgo is.  llgo uses 
> standard Go library packages like go/parser and go/types with the LLVM 
> backend. 
>
> Ian 
>

-- 
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/349445f9-6c3e-49c2-9690-5767928b583a%40googlegroups.com.


[go-nuts] Re: x/net/Listen behaviours

2019-09-18 Thread joe mcguckin
Is listener() a blocking operation?

-- 
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/3712c16a-2ac0-41c6-ad18-8ca90faad9ae%40googlegroups.com.


[go-nuts] Re: How to build gollvm on arm platform

2019-09-18 Thread joe mcguckin
What's the difference between the standard GO compiler and GOLLVM? I 
thought there was an llvm based compiler that was abandoned?

Thanks,

Joe

-- 
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/ca707e0e-acab-43de-85d3-5d6f41ecbaef%40googlegroups.com.


[go-nuts] Where are the GO compiler sources?

2019-09-16 Thread joe mcguckin
Also, what does the X (e.g. /X/) in the path of various runtime libraries 
mean?

Thanks,

Joe

-- 
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/3982e75a-af97-4baf-b4cc-424a5b6031d4%40googlegroups.com.


[go-nuts] Re: VS + GO plugin questions

2019-09-16 Thread joe mcguckin
Why wouldn't it have an implementation? Does one have to set a path 
variable (or similar) to allow VS to find all the source and add-on 
packages?

Joe

On Monday, September 16, 2019 at 11:31:14 AM UTC-7, joe mcguckin wrote:
>
> I installed this on my Mac. For M$, it actually looks pretty nice.
>
> I had to remap the F12 key, is this normal? 
>
> From the docs, SHIFT+COMMAND+F12 is supposed to do something special. All 
> I get is a popup that says "Implementation not found" or it brings up a 
> window about a completely 
> different function. Is there something special I need to do to make it 
> resolve symbols that reside in a different package in a different directory?
>
> Btw, just hovering over the symbol seems to work ok.
>
> Thanks,
>
> Joe
>

-- 
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/4a17d919-7eb4-4ec0-8e35-4c5171cde8fd%40googlegroups.com.


[go-nuts] VS + GO plugin questions

2019-09-16 Thread joe mcguckin
I installed this on my Mac. For M$, it actually looks pretty nice.

I had to remap the F12 key, is this normal? 

>From the docs, SHIFT+COMMAND+F12 is supposed to do something special. All I 
get is a popup that says "Implementation not found" or it brings up a 
window about a completely 
different function. Is there something special I need to do to make it 
resolve symbols that reside in a different package in a different directory?

Btw, just hovering over the symbol seems to work ok.

Thanks,

Joe

-- 
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/1d1b0bf8-8334-424e-9d61-0359d3eb9d5b%40googlegroups.com.


[go-nuts] Is there a preferred REDIS driver or go psckage?

2019-09-09 Thread joe mcguckin


Thanks,

Joe

-- 
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/a82996c6-6163-4025-a3f2-f0d6f37b0473%40googlegroups.com.


[go-nuts] Empty cpu profile file?

2019-08-20 Thread joe mcguckin
Using Dave Cheney's profile package to figure out the execution path of a 
library I'm trying to understand.

The application starts, (it's a server), I hit ^c after a couple of 
minutes, and the console says

Stopping Profiling
Stopping

Main() catches the console interrupt:
signal.Notify(c, os.Interrupt)
log.Info("Stopping")

But the cpu profile file is empty. Is there a way to force is to sync 
before exiting?

-- 
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/b46a2b7f-0ac7-4e5a-a1e2-268a31f3afe8%40googlegroups.com.


Re: [go-nuts] net library

2019-08-20 Thread joe mcguckin
https://golang.org/pkg/net/

-- 
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/21bcd226-8829-43cf-a6ca-6490d1f248c4%40googlegroups.com.


[go-nuts] net library

2019-08-19 Thread joe mcguckin
I was perusing the NET library web page today.

1) Are the packages listed in any particular order?

2) What is the hierarchy? e.g., which functions correspond to the low level 
Unix network calls, 
 then there must be some higher level convenience functions. Is there a 
list of how the functions are ordered?

Thanks,

Joe

-- 
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/f369fc48-3407-4f59-b364-5d99155a13b1%40googlegroups.com.


[go-nuts] functions with arguments vs. function with a receiver?

2019-08-10 Thread joe mcguckin
Is there a recommended usage for either style?

Take ListenPacket for example. There a (*ListenConfig).ListenPacket version 
and a version that takes arguments.

What's the difference and what is the desired usage of either?

Thanks,

Joe

-- 
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/c24e67dd-acff-4821-b393-154b8ac90b1b%40googlegroups.com.


[go-nuts] Go coaching in palo alto, mountain view

2019-07-28 Thread joe mcguckin
I’m looking for an experienced go developer that I can rent for an hour a week 
to answer questions, explain thing about the go toolchain, libraries and 
runtime.

Thanks,

Joe

-- 
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/44392d0d-7ab2-4531-8bda-e2934fdc45be%40googlegroups.com.


[go-nuts] go question about goroutines

2019-07-24 Thread joe mcguckin
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

-- 
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/489f6343-69ea-4d0e-a13e-0c7acd585ad0%40googlegroups.com.


[go-nuts] mutexes, etc

2019-07-17 Thread joe mcguckin
When do you need to use mutexes? Which begs the question: When can multiple 
coroutines trample on  memory or a variable?
Doesn't each instance of a go routine get it's own stack (so, it's own 
local copy of local vars). It would seem that the only
entities that it's possible to access from multiple goroutines are things 
allocated from the heap, as you mould have identical pointer 
values in multiple go threads - yes?  

Like they say, Inquiring minds want to know...

Thanks,

Joe

-- 
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/a1fdcdb2-3276-4b67-88be-5414c12ccac5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.