title: Efficient threading scheme
body: <p>I'm writing a java GUI that performs certain operations through the serial port. Since I don't want it to block while waiting for a response I figured having a thread do it was a better way, but now I'm faced with two options and I don't know which would be more efficient:</p>
  
  <ul>
  <li>Case 1: Create a single thread for each asynchronous task.</li>
  <li>Case 2: Keep a single thread sleeping and have it perform different tasks by changing an atomic integer's value and then interrupting it.</li>
  </ul>
  
  <p>None of these operations will be processor intensive, but I still wonder if it's wise to keep a thread in memory permanently.</p>