{"action":"created","issue":{"url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/1398","repository_url":"https://api.github.com/repos/Reactive-Extensions/RxJS","labels_url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/1398/labels{/name}","comments_url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/1398/comments","events_url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/1398/events","html_url":"https://github.com/Reactive-Extensions/RxJS/issues/1398","id":197949559,"number":1398,"title":"Sample operator not completing when used in connection with `never`","user":{"login":"brucou","id":7799297,"avatar_url":"https://avatars.githubusercontent.com/u/7799297?v=3","gravatar_id":"","url":"https://api.github.com/users/brucou","html_url":"https://github.com/brucou","followers_url":"https://api.github.com/users/brucou/followers","following_url":"https://api.github.com/users/brucou/following{/other_user}","gists_url":"https://api.github.com/users/brucou/gists{/gist_id}","starred_url":"https://api.github.com/users/brucou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brucou/subscriptions","organizations_url":"https://api.github.com/users/brucou/orgs","repos_url":"https://api.github.com/users/brucou/repos","events_url":"https://api.github.com/users/brucou/events{/privacy}","received_events_url":"https://api.github.com/users/brucou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-29T03:50:01Z","updated_at":"2016-12-29T11:11:03Z","closed_at":null,"body":"The following code \r\n\r\n```\r\nconst $ = Rx.Observable;\r\n$.never().sample($.interval(100).take(1)).subscribe(\r\nfunction next(x){console.log('value', x);},\r\nfunction error(x){console.log('error', x);},\r\nfunction complete(){console.log('complete', x)}\r\n)\r\n```\r\n\r\ndoes not produce any message in the console (cf. https://jsfiddle.net/z3ssts6q/). \r\n\r\nIt is my understanding that when the sampler completes, the `...sample(...)` should complete too. Is it my understanding that is incorrect or the implementation? This code might look stupid but in fact I don't choose the `$.never`, it comes as the return value of a function and my code has to work also with this edge case.\r\n\r\nStrangely enough this does not produce any value :\r\n```\r\nconst $ = Rx.Observable;\r\n$.never()\r\n.takeUntil($.interval(500).take(1))\r\n.sample($.interval(100).take(2))\r\n.subscribe(\r\nfunction next(x){console.log('value', x);},\r\nfunction error(x){console.log('error', x);},\r\nfunction complete(x){console.log('complete', x)}\r\n)\r\n```\r\n\r\nwhile this does signal completion \r\n```\r\nconst $ = Rx.Observable;\r\n$.never()\r\n.takeUntil($.interval(500).take(1))\r\n//.sample($.interval(100).take(2))\r\n.subscribe(\r\nfunction next(x){console.log('value', x);},\r\nfunction error(x){console.log('error', x);},\r\nfunction complete(x){console.log('complete', x)}\r\n)\r\n```"},"comment":{"url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/comments/269615333","html_url":"https://github.com/Reactive-Extensions/RxJS/issues/1398#issuecomment-269615333","issue_url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/1398","id":269615333,"user":{"login":"skoch-fixeads","id":14939408,"avatar_url":"https://avatars.githubusercontent.com/u/14939408?v=3","gravatar_id":"","url":"https://api.github.com/users/skoch-fixeads","html_url":"https://github.com/skoch-fixeads","followers_url":"https://api.github.com/users/skoch-fixeads/followers","following_url":"https://api.github.com/users/skoch-fixeads/following{/other_user}","gists_url":"https://api.github.com/users/skoch-fixeads/gists{/gist_id}","starred_url":"https://api.github.com/users/skoch-fixeads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skoch-fixeads/subscriptions","organizations_url":"https://api.github.com/users/skoch-fixeads/orgs","repos_url":"https://api.github.com/users/skoch-fixeads/repos","events_url":"https://api.github.com/users/skoch-fixeads/events{/privacy}","received_events_url":"https://api.github.com/users/skoch-fixeads/received_events","type":"User","site_admin":false},"created_at":"2016-12-29T11:11:03Z","updated_at":"2016-12-29T11:11:03Z","body":"Hey\r\n\r\nExists two documentation:\r\n- First the specification http://reactivex.io/documentation/operators/empty-never-throw.html where say that this operator _\"create an Observable that emits no items and does not terminate\"_\r\n- Second the implementation: http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html#static-method-never where don't mention that *never operator* does not terminate.\r\n"}}
{"actor":{"display_login":"skoch-fixeads"}}