title: Android mediator pattern with threads
body: <p>I got the following problem:</p>
  
  <p>I want to use the mediator pattern for an app.</p>
  
  <p>I got a producer that creates values.
  I got a mediator that stores the values in a queue(which is private, so getters and setters exist) and notifices the consumer that there are new values in the queue.
  I got the consumer, that gets notified about a new value, gets it and does stuff with it...</p>
  
  <p>I want all 3 classes to run on own threads.
  But I also want to be efficient.</p>
  
  <p>If I understand it right, my mediator thread will be GCed when run() ends... so I would need to keep it alive by a loop, don't I? Like while(true), but this is not very efficient. Is there a better way? Or am I totally incorrect and the mediator wouldn't be GCed?</p>
  
  <p>Thanks in advance</p>