tag:blogger.com,1999:blog-318596391703166199.post8423071504214311265..comments2023-08-07T23:23:15.074-07:00Comments on Advanced Reactive Java: Operator concurrency primitives: serialized access (part 1)David Karnokhttp://www.blogger.com/profile/07920580392321059533noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-318596391703166199.post-75096721863911535492018-01-05T04:30:57.042-08:002018-01-05T04:30:57.042-08:00To emphasize that avoiding reading a field multipl...To emphasize that avoiding reading a field multiple times is preferable (by using a local variable). Here, there is no functional difference. As time passes, coding style gets refined but old code is often not updated for the sake of prettiness only.David Karnokhttps://www.blogger.com/profile/07920580392321059533noreply@blogger.comtag:blogger.com,1999:blog-318596391703166199.post-10798904249773489732018-01-05T03:42:49.296-08:002018-01-05T03:42:49.296-08:00Hi David.
In the `ValueListEmitterLoop` class in ...Hi David.<br /><br />In the `ValueListEmitterLoop` class in the first `synchronized` block you have this code:<br /><br />```<br /> if (emitting) {<br /> List q = queue;<br /> if (q == null) {<br /> q = new ArrayList<>(); // (2)<br /> queue = q;<br /> }<br /> q.add(value);<br /> return;<br /> }<br /> emitting = true;<br />```<br /><br />Why is there an extra variable `List q`. What's the different between the existing code and this one:<br /><br />```<br /> if (emitting)<br /> if (queue == null) {<br /> queue = new ArrayList<>(); // (2)<br /> }<br /> queue.add(value);<br /> return;<br /> }<br /> emitting = true;<br />```<br />Thanks.Anonymoushttps://www.blogger.com/profile/07438457578788736695noreply@blogger.comtag:blogger.com,1999:blog-318596391703166199.post-77161935861563908942017-09-06T07:31:08.700-07:002017-09-06T07:31:08.700-07:00Thank you so much. Hope you're keep writing an...Thank you so much. Hope you're keep writing and share knowledgebad-writerhttps://www.blogger.com/profile/16063563358332773155noreply@blogger.comtag:blogger.com,1999:blog-318596391703166199.post-56575768297135655692016-12-13T07:08:01.700-08:002016-12-13T07:08:01.700-08:00Hi David! Amazing article. One thing: could you e...Hi David! Amazing article. One thing: could you elaborate on the deadlock conditions you shortly referenced in the intro? An example would really help. Thanks!Anonymoushttps://www.blogger.com/profile/13359872018626648697noreply@blogger.comtag:blogger.com,1999:blog-318596391703166199.post-27236694474853486002016-05-07T23:38:01.825-07:002016-05-07T23:38:01.825-07:00Dear David, I have started the process of translat...Dear David, I have started the process of translating this Advanced RxJava blog series to Chinese, it's hosted on http://blog.piasy.com/AdvancedRxJava/ , and the source is hosted on Github: https://github.com/Piasy/AdvancedRxJava.<br /><br />This article is translated, link: http://blog.piasy.com/AdvancedRxJava/2016/05/06/operator-concurrency-primitives/. Anonymoushttps://www.blogger.com/profile/03373759059873469334noreply@blogger.comtag:blogger.com,1999:blog-318596391703166199.post-69801084983204194962016-05-07T13:24:31.254-07:002016-05-07T13:24:31.254-07:00Thanks, fixed.Thanks, fixed.David Karnokhttps://www.blogger.com/profile/07920580392321059533noreply@blogger.comtag:blogger.com,1999:blog-318596391703166199.post-27256449527199107082016-05-07T08:28:25.065-07:002016-05-07T08:28:25.065-07:00In the sentence "If there were missed work, w...In the sentence "If there were missed work, we reset the missing flag and loop again. Resetting the flag is essential to avoid infinite emission loops", we reset the missed flag rather than missing flag, right?Anonymoushttps://www.blogger.com/profile/03373759059873469334noreply@blogger.comtag:blogger.com,1999:blog-318596391703166199.post-84889079320379784952016-02-24T16:18:08.897-08:002016-02-24T16:18:08.897-08:00I love this blog...your articles have been extreme...I love this blog...your articles have been extremely helpful for shortening the RxJava learning curve and cementing the API definitions into something more tangible. Thank you so much!MandyPantshttps://www.blogger.com/profile/12914742569290133929noreply@blogger.comtag:blogger.com,1999:blog-318596391703166199.post-56325433666283519202015-05-14T07:08:48.956-07:002015-05-14T07:08:48.956-07:00I thank you for JCTools; learned a lot from the so...I thank you for JCTools; learned a lot from the sources and your blog posts!David Karnokhttps://www.blogger.com/profile/07920580392321059533noreply@blogger.comtag:blogger.com,1999:blog-318596391703166199.post-55080026252820057852015-05-13T15:20:39.797-07:002015-05-13T15:20:39.797-07:00Thanks for the mention of JCTools, and for your fe...Thanks for the mention of JCTools, and for your feedback and involvement :-)Nitsanhttps://www.blogger.com/profile/10496299147100350513noreply@blogger.com