code: public long getQueuedTaskCount() {
          long count = 0;
          WorkQueue[] ws; WorkQueue w;
          if ((ws = workQueues) != null) {
              for (int i = 1; i < ws.length; i += 2) {
                  if ((w = ws[i]) != null)
                      count += w.queueSize();
              }
          }
          return count;
      }
docs: Returns an estimate of the total number of tasks currently held
  in queues by worker threads (but not including tasks submitted
  to the pool that have not begun executing). This value is only
  an approximation, obtained by iterating across all threads in
  the pool. This method may be useful for tuning task
  granularities.
  
  @return the number of queued tasks