[pypy-commit] pypy rgc-mem-pressure: small change to mem pressure for semaphores

justinpeel noreply at buildbot.pypy.org
Tue Oct 18 06:18:18 CEST 2011


Author: Justin Peel <notmuchtotell at gmail.com>
Branch: rgc-mem-pressure
Changeset: r48179:e177050f0c14
Date: 2011-10-17 22:18 -0600
http://bitbucket.org/pypy/pypy/changeset/e177050f0c14/

Log:	small change to mem pressure for semaphores

diff --git a/pypy/module/_multiprocessing/interp_semaphore.py b/pypy/module/_multiprocessing/interp_semaphore.py
--- a/pypy/module/_multiprocessing/interp_semaphore.py
+++ b/pypy/module/_multiprocessing/interp_semaphore.py
@@ -305,9 +305,10 @@
         sem = sem_open(name, os.O_CREAT | os.O_EXCL, 0600, val)
         try:
             sem_unlink(name)
-            rgc.add_memory_pressure(SEM_T_SIZE)
         except OSError:
             pass
+        else:
+            rgc.add_memory_pressure(SEM_T_SIZE)
         return sem
 
     def delete_semaphore(space, handle):


More information about the pypy-commit mailing list