title: Assign Priority for Callable type threads
body: <p>I am working on Threads task, which required to assign priorities for callable threads.</p>
  
  <p>here is my code.</p>
  
  <pre><code>public void processURL(String[] synchronous, String[] asynchronous) {
      ExecutorService es = Executors.newFixedThreadPool(NTHREADS);
      for (int i = 0; i &lt; asynchronous.length; i++) {
          es.execute(new TaskAsyn("Asynchronous Task: " + i, asynchronous[i],
                  waiting));
      }
  
      List&lt;Future&lt;ToStore&gt;&gt; futures = new ArrayList&lt;Future&lt;ToStore&gt;&gt;();
      for (int i = 0; i &lt; synchronous.length; i++) {
          Future&lt;ToStore&gt; future = es.submit(new TaskSynch(
                  "synchronous Task: " + i, synchronous[i], waiting));
          futures.add(future);
      }
  
      for (Future&lt;ToStore&gt; future : futures) {
          try {
              ToStore s = future.get();
              // TODO
              System.out.println("Synchronous Task: " + s.getUrl()
                      + " has finished.");
          } catch (InterruptedException e) {
              e.printStackTrace();
          } catch (ExecutionException e) {
              e.printStackTrace();
          }
      }
  
      System.out.println("here");
  }
  </code></pre>
  
  <p>synchronous being executed in callable threads to get results in future.
  asynchronous being executed in runnable threads.</p>
  
  <p>I can make asynchronous callable threads as well;not the point, so my only problem how to make <code>ExecuterService</code> to be assigned threads with priority.</p>