<div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><br><br>one might ask why the queue became unreachable without extra communication, eg via interrupting the thread. You'd need to elaborate more why that would be a perfectly good concurrent system, not just puzzle over the contrived example</div></blockquote><div><br></div><div>Answer is quite simple:  queue became unreachable without extra communication because I want avoid extra communication, eg via interrupting the thread.<br>I want producer and consumer be loosely coupled. They are connected only by blocking queue. When queue must be unreachable, it is enough that someone, for example consumer, producer or third actor makes the queue null. After that queue as well as consumer are GC'able</div><div><br></div><div>All extra communication overhead is that producer must verify if <i style="">current </i>queue is not null</div></div></div></div></div>