rakeeb
02/05/2018, 9:00 AMedwardwongtl
02/05/2018, 9:08 AMnumberGenerator
example, try unscribe firstFeed
before subscribing with secondFeed
, you will see two invocation of Shutting down.....
asad.awadia
02/05/2018, 10:35 AMfun getTweets()
etc]russhwolf
02/05/2018, 2:56 PM.share()
?rakeeb
02/05/2018, 2:59 PMrakeeb
02/05/2018, 2:59 PMrakeeb
02/05/2018, 3:00 PMedwardwongtl
02/05/2018, 3:03 PMrefcount()
worksedwardwongtl
02/05/2018, 3:04 PMrefcount
only cares if there is at least one subscriber or not, so if you unsub before the second one kicks in, the number of subscriber will drop from 1 to 0, leading to the termination of the streamedwardwongtl
02/05/2018, 3:05 PMrefcount
notice the number of subscriber jumps from 0 to 1, and it start the stream all over againrakeeb
02/05/2018, 3:05 PMconnect
then?edwardwongtl
02/05/2018, 3:06 PMrakeeb
02/05/2018, 3:06 PMedwardwongtl
02/05/2018, 3:08 PMpublish()
with autoConnect(numberOfSubs)
is more flexibleedwardwongtl
02/05/2018, 3:08 PMrakeeb
02/05/2018, 3:09 PMedwardwongtl
02/05/2018, 3:09 PMrakeeb
02/05/2018, 3:10 PMrakeeb
02/05/2018, 3:11 PM