Skip to content
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

Building with -race and then running show data race #40

Closed
chriscool opened this issue May 24, 2015 · 2 comments
Closed

Building with -race and then running show data race #40

chriscool opened this issue May 24, 2015 · 2 comments

Comments

@chriscool
Copy link

After cloning I did the following:

$ cd pb/example
$ go build -race
$ ./example 
4886 / 5000 [=======================================================================================================================>--] 97.72 % 0==================
WARNING: DATA RACE
Write by main goroutine:
  github.com/cheggaaa/pb.(*ProgressBar).Finish()
      /home/christian/gocode/src/github.com/cheggaaa/pb/pb.go:189 +0x3b
  github.com/cheggaaa/pb.(*ProgressBar).FinishPrint()
      /home/christian/gocode/src/github.com/cheggaaa/pb/pb.go:198 +0x38
  main.main()
      /home/christian/git/pb/example/pb.go:29 +0x12b

Previous read by goroutine 5:
  github.com/cheggaaa/pb.(*ProgressBar).writer()
      /home/christian/gocode/src/github.com/cheggaaa/pb/pb.go:328 +0x3b

Goroutine 5 (running) created at:
  github.com/cheggaaa/pb.(*ProgressBar).Start()
      /home/christian/gocode/src/github.com/cheggaaa/pb/pb.go:101 +0x143
  main.main()
      /home/christian/git/pb/example/pb.go:24 +0xc7
==================
5000 / 5000 [========================================================================================================================] 100.00 % 5s
The End!
Found 1 data race(s)
@chriscool
Copy link
Author

Ooops it looks like I am using an old version. I will have a look again.

@chriscool
Copy link
Author

Yeah it works fine with the latest version. Sorry again!

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

No branches or pull requests

1 participant