{"action":"opened","issue":{"url":"https://api.github.com/repos/ReactiveX/rxdart/issues/172","repository_url":"https://api.github.com/repos/ReactiveX/rxdart","labels_url":"https://api.github.com/repos/ReactiveX/rxdart/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/rxdart/issues/172/comments","events_url":"https://api.github.com/repos/ReactiveX/rxdart/issues/172/events","html_url":"https://github.com/ReactiveX/rxdart/issues/172","id":338805742,"node_id":"MDU6SXNzdWUzMzg4MDU3NDI=","number":172,"title":"BehaviorSubject onCancel incompatible with StreamController","user":{"login":"mjohnsullivan","id":102488,"node_id":"MDQ6VXNlcjEwMjQ4OA==","avatar_url":"https://avatars3.githubusercontent.com/u/102488?v=4","gravatar_id":"","url":"https://api.github.com/users/mjohnsullivan","html_url":"https://github.com/mjohnsullivan","followers_url":"https://api.github.com/users/mjohnsullivan/followers","following_url":"https://api.github.com/users/mjohnsullivan/following{/other_user}","gists_url":"https://api.github.com/users/mjohnsullivan/gists{/gist_id}","starred_url":"https://api.github.com/users/mjohnsullivan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjohnsullivan/subscriptions","organizations_url":"https://api.github.com/users/mjohnsullivan/orgs","repos_url":"https://api.github.com/users/mjohnsullivan/repos","events_url":"https://api.github.com/users/mjohnsullivan/events{/privacy}","received_events_url":"https://api.github.com/users/mjohnsullivan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-06T05:01:17Z","updated_at":"2018-07-06T05:01:17Z","closed_at":null,"author_association":"NONE","body":"I tried to swap out a broadcast StreamController with BehaviorSubject, but hit issues as oinCancel for StreamController takes () => Void, but BehaviorSubject takes () => Future<dynamic>. This lead to less than optimal code for the onCancel function:\r\n\r\n  Future<Null> _onCancelFunc() {\r\n    // Do sync stuff here\r\n    return null;\r\n  }\r\n\r\nThe docs suggest that void is a valid option: The callback may return either void or a future."}}
{"actor":{"display_login":"mjohnsullivan"}}