~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-06-05 15:03:17 UTC
  • mfrom: (4413.1.1 bsd-concurrency)
  • Revision ID: pqm@pqm.ubuntu.com-20090605150317-n3bjy7kqjvizgiv6
(Matthew Fuller) Catch the number of cores on FreeBSD too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1841
1841
    def _local_concurrency():
1842
1842
        return subprocess.Popen(['sysctl', '-n', 'hw.availcpu'],
1843
1843
                                stdout=subprocess.PIPE).communicate()[0]
 
1844
elif sys.platform[0:7] == 'freebsd':
 
1845
    def _local_concurrency():
 
1846
        return subprocess.Popen(['sysctl', '-n', 'hw.ncpu'],
 
1847
                                stdout=subprocess.PIPE).communicate()[0]
1844
1848
elif sys.platform == 'sunos5':
1845
1849
    def _local_concurrency():
1846
1850
        return subprocess.Popen(['psrinfo', '-p',],