{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2791","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2791/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2791/comments","events_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2791/events","html_url":"https://github.com/ReactiveX/RxJava/issues/2791","id":59550380,"number":2791,"title":"GroupBy throws exception when calling onNext from multiple threads.","user":{"login":"elrodro83","id":8010105,"avatar_url":"https://avatars.githubusercontent.com/u/8010105?v=3","gravatar_id":"","url":"https://api.github.com/users/elrodro83","html_url":"https://github.com/elrodro83","followers_url":"https://api.github.com/users/elrodro83/followers","following_url":"https://api.github.com/users/elrodro83/following{/other_user}","gists_url":"https://api.github.com/users/elrodro83/gists{/gist_id}","starred_url":"https://api.github.com/users/elrodro83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elrodro83/subscriptions","organizations_url":"https://api.github.com/users/elrodro83/orgs","repos_url":"https://api.github.com/users/elrodro83/repos","events_url":"https://api.github.com/users/elrodro83/events{/privacy}","received_events_url":"https://api.github.com/users/elrodro83/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-02T21:07:01Z","updated_at":"2015-03-03T15:35:56Z","closed_at":"2015-03-03T15:35:56Z","body":"I'm getting the exception thrown in line 308 of OperatorGroupBy when calling onNext from multiple threads. The comment line 307 suggest i shouldn't be doing that, but the usage of concurrent classes and the overall design of the class (and other rx operators i've used without problem) suggest that shouldn't be a problem and be treated as a bug.\r\n\r\nFrom the code, when running for the first time (discovering the groups) the condition of line 217 can be true for more than one thread, and that would trigger 2 creations of the same group and the exception I'm getting."},"comment":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/comments/76968237","html_url":"https://github.com/ReactiveX/RxJava/issues/2791#issuecomment-76968237","issue_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2791","id":76968237,"user":{"login":"elrodro83","id":8010105,"avatar_url":"https://avatars.githubusercontent.com/u/8010105?v=3","gravatar_id":"","url":"https://api.github.com/users/elrodro83","html_url":"https://github.com/elrodro83","followers_url":"https://api.github.com/users/elrodro83/followers","following_url":"https://api.github.com/users/elrodro83/following{/other_user}","gists_url":"https://api.github.com/users/elrodro83/gists{/gist_id}","starred_url":"https://api.github.com/users/elrodro83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elrodro83/subscriptions","organizations_url":"https://api.github.com/users/elrodro83/orgs","repos_url":"https://api.github.com/users/elrodro83/repos","events_url":"https://api.github.com/users/elrodro83/events{/privacy}","received_events_url":"https://api.github.com/users/elrodro83/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T15:35:56Z","updated_at":"2015-03-03T15:35:56Z","body":"Got it. Thanks!"}}