code: public boolean runInThread (final Runnable aRunnable)
    {
      if (aRunnable == null)
        return false;
  
      synchronized (m_aNextRunnableLock)
      {
        m_bHandoffPending = true;
  
        // Wait until a worker thread is available
        while ((m_aAvailWorkers.size () < 1) && !m_bIsShutdown)
        {
          try
          {
            m_aNextRunnableLock.wait (500);
          }
          catch (final InterruptedException ignore)
          {
            // ignore
          }
        }
  
        if (!m_bIsShutdown)
        {
          final WorkerThread wt = m_aAvailWorkers.remove (0);
          m_aBusyWorkers.add (wt);
          wt.run (aRunnable);
        }
        else
        {
          // If the thread pool is going down, execute the Runnable
          // within a new additional worker thread (no thread from the pool).
          final WorkerThread wt = new WorkerThread (this,
                                                    m_aThreadGroup,
                                                    "WorkerThread-LastJob",
                                                    m_nPrio,
                                                    isMakeThreadsDaemons (),
                                                    aRunnable);
          m_aBusyWorkers.add (wt);
          m_aWorkers.add (wt);
          wt.start ();
        }
        m_aNextRunnableLock.notifyAll ();
        m_bHandoffPending = false;
      }
  
      return true;
    }
docs: <p>
  Run the given <code>Runnable</code> object in the next available
  <code>Thread</code>. If while waiting the thread pool is asked to shut
  down, the Runnable is executed immediately within a new additional thread.
  </p>
  
  @param aRunnable
  the <code>Runnable</code> to be added.