+
Skip to content

Fix data races #771

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

Merged
merged 3 commits into from
Jun 20, 2023
Merged

Fix data races #771

merged 3 commits into from
Jun 20, 2023

Conversation

WGH-
Copy link
Collaborator

@WGH- WGH- commented Jun 19, 2023

Closes #594

Also fixes a data race bug in tests, and enables CI testing of ./queue sub-package which was accidentally left out.

WGH- added 3 commits June 19, 2023 23:34
It's unsafe to copy as is.

Closes gocolly#594
rand.Rand is not safe for concurrent use, and go test -race
immediately detects the bug.
This is why data race in queue_test.go hasn't been detected on CI.
@WGH- WGH- requested a review from asciimoo June 19, 2023 20:36
Copy link
Member

@asciimoo asciimoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@asciimoo asciimoo merged commit a6e3d81 into gocolly:master Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

data race in http_backend.go:190
2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载