We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Had a section of code which pulls a value from a zenq queue:
if dat := zenq.Select(b.notifyQ, b.writeQ); dat != nil { switch dat.(type) { case *bounceNofity: switch dat.(*bounceNofity).event { case bShutdown: model_debugf("BounceMap: writerLoop got shutdown") shutdown = true case bShutdownnow: break writerLoop } case *Bounce: bnc := dat.(*Bounce) if bnc.writecb != nil { bnc.writecb(bnc) } if bnc.writecb2 != nil { bnc.writecb2(bnc) } }
When doing a tests of a 1000 concurrent "Bounce" pointers coming in to the zenq concurrently, i get a handful of duplicate reads from zenq.
When i switch the zenq over to a normal channel, I don't have this issue:
select { case bnc := <-b.writeQ: if bnc.writecb != nil { bnc.writecb(bnc) } if bnc.writecb2 != nil { bnc.writecb2(bnc) } case ev := <-b.notifyQ: switch ev.event { case bShutdown: model_debugf("BounceMap: writerLoop got shutdown") shutdown = true case bShutdownnow: break writerLoop } }
Provided 4 sources files to completely reproduce the test in question: TestBounceMap1000
TestBounceMap1000
I may well have a bug in my code. Or just don't understand something fundamental about Zenq - but by switching out to channels i dont have the issue.
go test -tags model_debug -v -run TestBounceMap
The text was updated successfully, but these errors were encountered:
test.zip
In the code, the chan version is currently on, and the zenq version is commented out.
chan
zenq
Sorry, something went wrong.
Also, on aarch64 machine - MacOS M1 Max
aarch64
I will check this out and get back to you
No branches or pull requests
Had a section of code which pulls a value from a zenq queue:
When doing a tests of a 1000 concurrent "Bounce" pointers coming in to the zenq concurrently, i get a handful of duplicate reads from zenq.
When i switch the zenq over to a normal channel, I don't have this issue:
Provided 4 sources files to completely reproduce the test in question:
TestBounceMap1000
I may well have a bug in my code. Or just don't understand something fundamental about Zenq - but by switching out to channels i dont have the issue.
The text was updated successfully, but these errors were encountered: