{"action":"opened","issue":{"url":"https://api.github.com/repos/adjust/rmq/issues/48","repository_url":"https://api.github.com/repos/adjust/rmq","labels_url":"https://api.github.com/repos/adjust/rmq/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/adjust/rmq/issues/48/comments","events_url":"https://api.github.com/repos/adjust/rmq/issues/48/events","html_url":"https://github.com/adjust/rmq/issues/48","id":350875365,"node_id":"MDU6SXNzdWUzNTA4NzUzNjU=","number":48,"title":"Data race ","user":{"login":"Xeoncross","id":56460,"node_id":"MDQ6VXNlcjU2NDYw","avatar_url":"https://avatars0.githubusercontent.com/u/56460?v=4","gravatar_id":"","url":"https://api.github.com/users/Xeoncross","html_url":"https://github.com/Xeoncross","followers_url":"https://api.github.com/users/Xeoncross/followers","following_url":"https://api.github.com/users/Xeoncross/following{/other_user}","gists_url":"https://api.github.com/users/Xeoncross/gists{/gist_id}","starred_url":"https://api.github.com/users/Xeoncross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xeoncross/subscriptions","organizations_url":"https://api.github.com/users/Xeoncross/orgs","repos_url":"https://api.github.com/users/Xeoncross/repos","events_url":"https://api.github.com/users/Xeoncross/events{/privacy}","received_events_url":"https://api.github.com/users/Xeoncross/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-15T16:25:50Z","updated_at":"2018-08-15T16:25:50Z","closed_at":null,"author_association":"NONE","body":"I am trying to figure out what I'm doing wrong in causing a data race with `redisQueue.StopConsuming()`\r\n\r\n```\r\nWARNING: DATA RACE\r\nWrite at 0x00c4201960a8 by goroutine 104:\r\n  github.com/adjust/rmq.(*redisQueue).StopConsuming()\r\n      /Users/owner/go/src/github.com/adjust/rmq/queue.go:222 +0x9b\r\n  main.main.func2()\r\n\r\nPrevious read at 0x00c4201960a8 by goroutine 19:\r\n  github.com/adjust/rmq.(*redisQueue).consume()\r\n      /Users/owner/go/src/github.com/adjust/rmq/queue.go:290 +0x68\r\n\r\nGoroutine 104 (running) created at:\r\n  main.main()\r\n\r\nGoroutine 19 (running) created at:\r\n  github.com/adjust/rmq.(*redisQueue).StartConsuming()\r\n      /Users/owner/go/src/github.com/adjust/rmq/queue.go:213 +0x18b\r\n  main.main()\r\n```\r\n\r\nCode:\r\n\r\n```\r\n\tconnection := rmq.OpenConnection(\"email queue\", \"tcp\", Address, 1)\r\n\temailQueue := connection.OpenQueue(\"emails\")\r\n\temailQueue.StartConsuming(100, time.Microsecond)\r\n\r\n\tconsumer := &queue.EmailConsumer{}\r\n\temailQueue.AddConsumer(\"consumer\", consumer)\r\n\r\n\temailQueue.StopConsuming()\r\n```"}}
{"actor":{"display_login":"Xeoncross"}}