Maor Kleinberger <kma...@gmail.com> added the comment:
> If I understand the following code correctly, there seems to be a busy loop > waiting for the SimpleQueue.put to signal that an item was entered to queue. This is not a busywait. Actually, the loop you specified will never repeat more than twice. At the first iteration, the queue's lock is acquired. At the second iteration, the loop waits for the lock to be released (by trying to acquire the lock again, which is not busywait). The lock is only released when something is put into the queue, so at that point the loop exits and the function returns. Avraham, could you provide a minimal python script that will reproduce the CPU usage spike? ---------- nosy: +kmaork _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39557> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com