Author: Armin Rigo <[email protected]>
Branch: fast-gil
Changeset: r72202:447468c284c3
Date: 2014-06-24 19:50 +0200
http://bitbucket.org/pypy/pypy/changeset/447468c284c3/

Log:    For now, increase the active pinging from the stealing thread to
        every 0.1 millisecond.

diff --git a/rpython/translator/c/src/thread_gil.c 
b/rpython/translator/c/src/thread_gil.c
--- a/rpython/translator/c/src/thread_gil.c
+++ b/rpython/translator/c/src/thread_gil.c
@@ -82,7 +82,7 @@
             /* Sleep for one interval of time.  We may be woken up earlier
                if 'mutex_gil' is released.
             */
-            if (mutex_lock_timeout(&mutex_gil, 0.001)) {   /* 1 ms... */
+            if (mutex_lock_timeout(&mutex_gil, 0.0001)) {   /* 0.1 ms... */
                 /* We arrive here if 'mutex_gil' was recently released
                    and we just relocked it.
                  */
diff --git a/rpython/translator/c/src/thread_nt.c 
b/rpython/translator/c/src/thread_nt.c
--- a/rpython/translator/c/src/thread_nt.c
+++ b/rpython/translator/c/src/thread_nt.c
@@ -219,7 +219,7 @@
 
 static inline int mutex_lock_timeout(mutex_t *mutex, double delay)
 {
-    DWORD result = WaitForSingleObject(*mutex, (DWORD)(delay * 1000.0 + 0.9));
+    DWORD result = WaitForSingleObject(*mutex, (DWORD)(delay * 1000.0 + 
0.999));
     return (result != WAIT_TIMEOUT);
 }
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to