[go-nuts] Re: Overwritten pointer value on channel

2017-03-28 Thread Danilo Cianfrone
Yeah, I eventually found out the reason. The factory method for the *stuff.Stuff object was using a value by refecence, produced on a writer goroutine and read by the goroutine that handled the multiplexer.Handler() function. Simply passing by value the variable on stuff.Stuff factory method solv

[go-nuts] Re: Overwritten pointer value on channel

2017-03-28 Thread djadala
ok, 1st guess is wrong. do you run your code with race enabled ? On Tuesday, March 28, 2017 at 4:08:17 PM UTC+3, Danilo Cianfrone wrote: > > Doesn't work, and doesn't make sense, even. > I assume the problem is in the channel, but can't figure out which and why. > > Il giorno martedì 28 marzo 2017

[go-nuts] Re: Overwritten pointer value on channel

2017-03-28 Thread Danilo Cianfrone
Doesn't work, and doesn't make sense, even. I assume the problem is in the channel, but can't figure out which and why. Il giorno martedì 28 marzo 2017 14:47:40 UTC+2, dja...@gmail.com ha scritto: > > >> go func(j tengin.Job) { m.OnJob(j); m.Done() }(job) > func(j tengin.Job) { go func(){ m.OnJob(

[go-nuts] Re: Overwritten pointer value on channel

2017-03-28 Thread djadala
>> go func(j tengin.Job) { m.OnJob(j); m.Done() }(job) func(j tengin.Job) { go func(){ m.OnJob(j); m.Done()}() }(job) Djadala On Tuesday, March 28, 2017 at 3:27:34 PM UTC+3, Danilo Cianfrone wrote: > > I'm experiencing a weird bug. > I have a microservice that uses FBP architecture, with a structu