tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

get_cpu_count.py (414B)


      1 # Copyright 2018 The Chromium Authors
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 # This script shows cpu count to specify capacity of action pool.
      6 
      7 
      8 import multiprocessing
      9 import sys
     10 
     11 def main():
     12  try:
     13    cpu_count = multiprocessing.cpu_count()
     14  except:
     15    cpu_count = 1
     16 
     17  print(cpu_count)
     18  return 0
     19 
     20 
     21 if __name__ == '__main__':
     22  sys.exit(main())