Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes acquire of the putlock semaphore to be non-blocking.
This so that the main thread is unlocked at shutdown, even if there are no more threads alive to release it. Closes celery#523. comment by @ask: Doesn't use Condition.acquire(timeout) because, that wakes up _very_ frequently: 500 µs (0.0005 s.) at best, and 0.05s at best. Since this is only applicable at shutdown we don't need this kind of responsiveness, as shutdown is already delayed by at least 1 second anyway.
- Loading branch information