{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/RxSwift/issues/722","repository_url":"https://api.github.com/repos/ReactiveX/RxSwift","labels_url":"https://api.github.com/repos/ReactiveX/RxSwift/issues/722/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/RxSwift/issues/722/comments","events_url":"https://api.github.com/repos/ReactiveX/RxSwift/issues/722/events","html_url":"https://github.com/ReactiveX/RxSwift/issues/722","id":157605829,"number":722,"title":"How to make a hot observable?","user":{"login":"milancermak","id":184055,"avatar_url":"https://avatars.githubusercontent.com/u/184055?v=3","gravatar_id":"","url":"https://api.github.com/users/milancermak","html_url":"https://github.com/milancermak","followers_url":"https://api.github.com/users/milancermak/followers","following_url":"https://api.github.com/users/milancermak/following{/other_user}","gists_url":"https://api.github.com/users/milancermak/gists{/gist_id}","starred_url":"https://api.github.com/users/milancermak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milancermak/subscriptions","organizations_url":"https://api.github.com/users/milancermak/orgs","repos_url":"https://api.github.com/users/milancermak/repos","events_url":"https://api.github.com/users/milancermak/events{/privacy}","received_events_url":"https://api.github.com/users/milancermak/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-31T07:23:53Z","updated_at":"2016-05-31T08:37:50Z","closed_at":"2016-05-31T08:37:49Z","body":"I have a setup like this:\r\n\r\n```\r\nDataManager.fetchData()\r\n.take(timeout, scheduler: MainScheduler.instance)\r\n.subscribeNext() { data in\r\n// handle data\r\n}\r\n.addDisposableT(disposeBag)\r\n```\r\n\r\nThe `fetchData` is time consuming, because it downloads from our servers, creates a bunch of objects and persists this to disk. I want all this to complete even if the `timeout` that's applied to the observable runs out, so I can take advantage of all the processing later on.\r\n\r\nI'm not very clear on how to make a hot Observable in RxSwift. I thought it's done using `publish` and `connect`, but that didn't work for me.\r\n\r\nWhat's the idiomatic way to do so?\r\n"},"comment":{"url":"https://api.github.com/repos/ReactiveX/RxSwift/issues/comments/222626304","html_url":"https://github.com/ReactiveX/RxSwift/issues/722#issuecomment-222626304","issue_url":"https://api.github.com/repos/ReactiveX/RxSwift/issues/722","id":222626304,"user":{"login":"milancermak","id":184055,"avatar_url":"https://avatars.githubusercontent.com/u/184055?v=3","gravatar_id":"","url":"https://api.github.com/users/milancermak","html_url":"https://github.com/milancermak","followers_url":"https://api.github.com/users/milancermak/followers","following_url":"https://api.github.com/users/milancermak/following{/other_user}","gists_url":"https://api.github.com/users/milancermak/gists{/gist_id}","starred_url":"https://api.github.com/users/milancermak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milancermak/subscriptions","organizations_url":"https://api.github.com/users/milancermak/orgs","repos_url":"https://api.github.com/users/milancermak/repos","events_url":"https://api.github.com/users/milancermak/events{/privacy}","received_events_url":"https://api.github.com/users/milancermak/received_events","type":"User","site_admin":false},"created_at":"2016-05-31T08:37:49Z","updated_at":"2016-05-31T08:37:49Z","body":"It seems I figured it out - `publish` and `connect` does work. The problem was I didn't retain the observable. It's a habit I have from the RAC world."}}
{"actor":{"display_login":"milancermak"}}