-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
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
Non-deterministic Behavior when Run in Multiple Goroutines #75
Comments
Note: You may need to increase the number of goroutines to 1000 or so. |
Needed 10000 goroutines to get a missmatch (and needed to changed the expected data, are you running the latest version?) 👍 However, this should be expected under load because of the timeout argument that is set to one second by default. Please add the following to your example. If you are still getting mixed results we should have serious look at this. func init() {
dmp.DiffTimeout = 0 // Do not time out on diff matching
} Maybe we should change the default timeout so that there is no timeout? |
Ah! A timeout might explain things. I updated to the latest version after filing this, but I still had the same issue (as you discovered, you have to set it to over 10000). Anyway, I'll try the timeout setting. Thanks! |
Please let me know how it went |
It didn't go well. Setting |
I'm seeing non-deterministic behavior when I run
dmp
in multiple goroutines. Basically, the "diffs" generated byDiffMain()
should be identical no matter how many goroutines are run, but they differ. I'm going to try my best to see if I can find the cause, but you might have a more deeper understanding of what's going on. :-)Here is the code (also attached as a file):
d.go.txt
The text was updated successfully, but these errors were encountered: