소스 검색

Have to revert patch for issue #523 because of performance degredation, until we find a better solution

Ask Solem 13 년 전
부모
커밋
8107ff983d
1개의 변경된 파일2개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 5
      celery/concurrency/processes/pool.py

+ 2 - 5
celery/concurrency/processes/pool.py

@@ -797,11 +797,8 @@ class Pool(object):
             warnings.warn(UserWarning("Soft timeouts are not supported: "
                     "on this platform: It does not have the SIGUSR1 signal."))
             soft_timeout = None
-        if waitforslot and self._putlock is not None:
-            while 1:
-                if self._state != RUN or self._putlock.acquire(False):
-                    break
-                time.sleep(1.0)
+        if waitforslot and self._putlock is not None and self._state == RUN:
+            self._putlock.acquire()
         if self._state == RUN:
             result = ApplyResult(self._cache, callback,
                                  accept_callback, timeout_callback,