[go-nuts] Merging Data Structures in Go

2016-11-16 Thread mspaulding06
Hello, I'm trying to write some code that will merge together two arbitrary data structures. I have something that seems to work okay, but wondering if anyone has encountered this before and maybe has a more elegant solution. https://play.golang.org/p/bkBCjhtfBa Thanks, Matt -- You received

[go-nuts] Re: Concurrency and order of execution

2016-11-11 Thread mspaulding06
Okay, that makes sense. I've updated my solution so that in the case that the channel only has a capacity of 1 the processing will be done without goroutines to ensure that it is done in serial. In the case that the channel capacity is larger then I don't care about how processing is ordered.

[go-nuts] Concurrency and order of execution

2016-11-10 Thread mspaulding06
Hello, I've written a small program to demonstrate what I am seeing. If I use a channel as a semaphore and set the size of the channel to 1, I would expect that the executions of my handle function below would all be executed in order, but it's not. For some reason the last item in the list i