title: Python Multiprocessing: Detecting available threads on multicore processors
body: <p>At risk of adding the the queue of multiprocessing questions, is there a way to detect the number of available threads per CPU similar to the <code>multiprocessing.cpu_count()</code>?  I have a <code>main()</code> function being asynchronously called from a pool that has one process per core available (default behavior if <code>processes=None</code>).</p>
  
  <pre><code>items = [2,4,6,8,10]
  pool = multiprocessing.Pool(processes=args.cores)
  results = [pool.apply_async(main, (item,), {threads=1}) for item in items]
  </code></pre>
  
  <p>However, I would like each of the <code>main()</code> calls to take advantage of all available threads by setting the <code>threads</code> arg explicitly.</p>
  
  <p>Is there a way to do this, or would it be too platform/system specific? Perhaps it could be done with the mysterious <code>from multiprocessing.pool import ThreadPool</code>, by combining with the threading module, or some other way?</p>
  
  <p>Any direction is appreciated, thanks!</p>