Andrew Gazelka
06/11/2019, 12:06 AMgildor
06/11/2019, 12:50 AMval a = aAsync.await(), without any delegationAndrew Gazelka
06/11/2019, 12:53 AMFlow (which will update over time) ... the reason for suspending at first is to wait until the first value from `Flow`s are returnedgildor
06/11/2019, 12:53 AMgildor
06/11/2019, 12:54 AMgildor
06/11/2019, 12:55 AMgildor
06/11/2019, 12:56 AMAndrew Gazelka
06/11/2019, 12:59 AMAndrew Gazelka
06/11/2019, 1:00 AMAndrew Gazelka
06/11/2019, 1:00 AMgildor
06/11/2019, 1:02 AMgildor
06/11/2019, 1:03 AMgildor
06/11/2019, 1:03 AMAndrew Gazelka
06/11/2019, 1:04 AMAndrew Gazelka
06/11/2019, 1:05 AMAndrew Gazelka
06/11/2019, 2:01 AMgildor
06/11/2019, 2:09 AMAndrew Gazelka
06/11/2019, 3:33 AMreceive() removes the last element... what if someone called receive() twice for one value? ...gildor
06/11/2019, 3:36 AMgildor
06/11/2019, 3:36 AMAndrew Gazelka
06/11/2019, 3:37 AMreceive() method in ConflatedBroadcastChannelAndrew Gazelka
06/11/2019, 3:42 AMgildor
06/11/2019, 3:44 AMgildor
06/11/2019, 3:44 AMAndrew Gazelka
06/11/2019, 3:44 AMAndrew Gazelka
06/11/2019, 3:44 AMConflatedBroadcastChannel.value does not workgildor
06/11/2019, 3:45 AMConflatedBroadcastChannel.openSubscription().receive() thanAndrew Gazelka
06/11/2019, 3:49 AMAndrew Gazelka
06/11/2019, 3:49 AMgildor
06/11/2019, 3:54 AMor it just seems weirdIt’s not weird, this stream of events, you have to open it, even if this stream is actually observable data
Andrew Gazelka
06/11/2019, 3:56 AMgildor
06/11/2019, 3:56 AMConflatedBroadcastChannel.asFlow().single() // or singleOrNull() if you don't want to throw exceptiongildor
06/11/2019, 3:58 AMbut you are opening it every time you need to poll a value (edited)yes, but what do you expect? Or you await it and than you need some primitive, or you just get current value
gildor
06/11/2019, 3:58 AMAndrew Gazelka
06/11/2019, 4:01 AMFlow (even though normally hot data... but the web socket is created with a function so it is self-contained and is still cold) ... then I am using the two flows in another function which does period calculation given the current price... the Flow is used for updates in price.gildor
06/11/2019, 5:24 AMperiod calculation given the current priceYou shouldn’t use pull for this
gildor
06/11/2019, 5:24 AMAndrew Gazelka
06/11/2019, 5:25 AMgildor
06/11/2019, 5:25 AMAndrew Gazelka
06/11/2019, 5:25 AMgildor
06/11/2019, 5:26 AMgildor
06/11/2019, 5:26 AMAndrew Gazelka
06/11/2019, 5:26 AMAndrew Gazelka
06/11/2019, 5:26 AMAndrew Gazelka
06/11/2019, 5:26 AMgildor
06/11/2019, 5:26 AMrequest what the current last value of databut you said that you cannot force request last data you do not control API
Andrew Gazelka
06/11/2019, 5:27 AMgildor
06/11/2019, 5:28 AMAndrew Gazelka
06/11/2019, 5:29 AMAndrew Gazelka
06/11/2019, 5:29 AMgildor
06/11/2019, 5:30 AMgildor
06/11/2019, 5:30 AMgildor
06/11/2019, 5:30 AMgildor
06/11/2019, 5:30 AMgildor
06/11/2019, 5:31 AMbufferSize = Channel.CONFLATED paramgildor
06/11/2019, 5:32 AMlouiscad
06/11/2019, 6:13 AM