These are chat archives for MetaStack-pl/MetaRx

13th
Jan 2016
Khunakon
@Khunakon
Jan 13 2016 02:00
When I do 'attach' on buffer changes channel, it push on previous change to observer but when do 'silentAttach', it only push new change.
For example:
val buffer = Buffer(1,2,3,4)
buffer.changes.attach(println)
Insert(Last(),1)
Insert(Last(),2)
Insert(Last(),3)
Insert(Last(),4)
res0: pl.metastack.metarx.ReadChannel[Unit] = UniChildChannel()
buffer.changes.silentAttach(println)
res1: pl.metastack.metarx.ReadChannel[Unit] = UniChildChannel()
This message was deleted
bf += 5
Insert(Last(),5)
Insert(Last(),5)
res2: Unit = ()
Am I right?
Is there any cautions or suggestion on 'attach' and 'silentAttach'?
Tim Nieradzik
@tindzk
Jan 13 2016 11:08
Yes, that's exactly how it works.