{"action":"opened","issue":{"url":"https://api.github.com/repos/staltz/xstream/issues/138","repository_url":"https://api.github.com/repos/staltz/xstream","labels_url":"https://api.github.com/repos/staltz/xstream/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/staltz/xstream/issues/138/comments","events_url":"https://api.github.com/repos/staltz/xstream/issues/138/events","html_url":"https://github.com/staltz/xstream/issues/138","id":187214080,"number":138,"title":"calling imitate multiple times","user":{"login":"whitecolor","id":736697,"avatar_url":"https://avatars.githubusercontent.com/u/736697?v=3","gravatar_id":"","url":"https://api.github.com/users/whitecolor","html_url":"https://github.com/whitecolor","followers_url":"https://api.github.com/users/whitecolor/followers","following_url":"https://api.github.com/users/whitecolor/following{/other_user}","gists_url":"https://api.github.com/users/whitecolor/gists{/gist_id}","starred_url":"https://api.github.com/users/whitecolor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitecolor/subscriptions","organizations_url":"https://api.github.com/users/whitecolor/orgs","repos_url":"https://api.github.com/users/whitecolor/repos","events_url":"https://api.github.com/users/whitecolor/events{/privacy}","received_events_url":"https://api.github.com/users/whitecolor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-03T23:07:35Z","updated_at":"2016-11-03T23:07:35Z","closed_at":null,"body":"I wonder how `imitate` called multiple times should behave. Or it should be allowed to be called only once with an error thrown for example.\r\nhttp://www.webpackbin.com/4kKOgnNxM\r\n\r\n```js\r\nimport xs from 'xstream'\r\n\r\nlet interval1$ = xs.periodic(200).mapTo(1).debug('interval1$')\r\n\r\nlet interval2$ = xs.periodic(1000).mapTo(2)\r\n\r\n\r\nlet source$ = xs.create()\r\n\r\nsource$.imitate(interval1$)\r\n\r\nsetTimeout(() => {\r\n  source$.imitate(interval2$)\r\n}, 1000)\r\n\r\nsource$.take(10).addListener({\r\n  next: (x) => console.log(x)\r\n})\r\n```\r\n\r\nThough it could be interesting to allow multiple times imitate call with proper unsubscribing from previous source."}}
{"actor":{"display_login":"whitecolor"}}