[pypy-commit] pypy stmgc-c7: Update

arigo noreply at buildbot.pypy.org
Wed Apr 2 22:49:27 CEST 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r70409:ec66fcad5d69
Date: 2014-04-02 22:43 +0200
http://bitbucket.org/pypy/pypy/changeset/ec66fcad5d69/

Log:	Update

diff --git a/lib_pypy/transaction.py b/lib_pypy/transaction.py
--- a/lib_pypy/transaction.py
+++ b/lib_pypy/transaction.py
@@ -105,7 +105,11 @@
 class _ThreadPool(object):
 
     def __init__(self):
-        self.num_threads = 4    # XXX default value, tweak
+        try:
+            from __pypy__.thread import getsegmentlimit
+            self.num_threads = getsegmentlimit()
+        except ImportError:
+            self.num_threads = 4
         self.in_transaction = False
         self.transactions_run = None
 


More information about the pypy-commit mailing list