{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2844","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2844/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2844/comments","events_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2844/events","html_url":"https://github.com/ReactiveX/RxJava/issues/2844","id":64013999,"number":2844,"title":"ConcatMap combined with Delay causes a hang","user":{"login":"DaGenix","id":2101211,"avatar_url":"https://avatars.githubusercontent.com/u/2101211?v=3","gravatar_id":"","url":"https://api.github.com/users/DaGenix","html_url":"https://github.com/DaGenix","followers_url":"https://api.github.com/users/DaGenix/followers","following_url":"https://api.github.com/users/DaGenix/following{/other_user}","gists_url":"https://api.github.com/users/DaGenix/gists{/gist_id}","starred_url":"https://api.github.com/users/DaGenix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaGenix/subscriptions","organizations_url":"https://api.github.com/users/DaGenix/orgs","repos_url":"https://api.github.com/users/DaGenix/repos","events_url":"https://api.github.com/users/DaGenix/events{/privacy}","received_events_url":"https://api.github.com/users/DaGenix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ReactiveX/RxJava/labels/Bug","name":"Bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-24T14:41:31Z","updated_at":"2015-03-24T15:47:40Z","closed_at":null,"body":"The following code:\r\n\r\n```java\r\npublic class Test {\r\n\tpublic static void main(final String[] arg) throws Exception {\r\n\t\tObservable.just(1)\r\n\t\t\t\t.repeat()\r\n\t\t\t\t.concatMap(x -> {\r\n\t\t\t\t\tSystem.out.println(x);\r\n\t\t\t\t\treturn Observable.empty()\r\n\t\t\t\t\t\t\t.delay(1, TimeUnit.SECONDS);\r\n\t\t\t\t})\r\n\t\t\t\t.subscribe();\r\n\t\t\r\n\t\tThread.sleep(Long.MAX_VALUE);\r\n\t}\r\n}\r\n```\r\n\r\nPrints out two \"1\"s quickly, and then another \"1\" every second afterward.\r\n\r\nIf you change that code just slightly two use the two argument form of `just()` as in:\r\n\r\n```java\r\npublic class Test {\r\n\tpublic static void main(final String[] arg) throws Exception {\r\n\t\tObservable.just(1, 2)\r\n\t\t\t\t.repeat()\r\n\t\t\t\t.concatMap(x -> {\r\n\t\t\t\t\tSystem.out.println(x);\r\n\t\t\t\t\treturn Observable.empty()\r\n\t\t\t\t\t\t\t.delay(1, TimeUnit.SECONDS);\r\n\t\t\t\t})\r\n\t\t\t\t.subscribe();\r\n\t\t\r\n\t\tThread.sleep(Long.MAX_VALUE);\r\n\t}\r\n}\r\n```\r\n\r\nThen, it prints \"1\", then \"2\", and then hangs and doesn't do anything afterward.\r\n\r\nI have no idea whats going on, but, I don't think that the 2nd piece of code should hang if the first one doesn't.\r\n\r\nI tested with 1.0.8 and didn't find any similar looking issue with a quick look."},"comment":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/comments/85568868","html_url":"https://github.com/ReactiveX/RxJava/issues/2844#issuecomment-85568868","issue_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2844","id":85568868,"user":{"login":"akarnokd","id":1269832,"avatar_url":"https://avatars.githubusercontent.com/u/1269832?v=3","gravatar_id":"","url":"https://api.github.com/users/akarnokd","html_url":"https://github.com/akarnokd","followers_url":"https://api.github.com/users/akarnokd/followers","following_url":"https://api.github.com/users/akarnokd/following{/other_user}","gists_url":"https://api.github.com/users/akarnokd/gists{/gist_id}","starred_url":"https://api.github.com/users/akarnokd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akarnokd/subscriptions","organizations_url":"https://api.github.com/users/akarnokd/orgs","repos_url":"https://api.github.com/users/akarnokd/repos","events_url":"https://api.github.com/users/akarnokd/events{/privacy}","received_events_url":"https://api.github.com/users/akarnokd/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T15:47:40Z","updated_at":"2015-03-24T15:47:40Z","body":"Thanks. This is a bug with ```repeat()``` and the fix is in #2845."}}