This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kmaork
Recipients Avraham Mahfuda, kmaork, mark.dickinson
Date 2020-02-20.21:00:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582232421.31.0.282697875861.issue39557@roundup.psfhosted.org>
In-reply-to
Content
> 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?
History
Date User Action Args
2020-02-20 21:00:21kmaorksetrecipients: + kmaork, mark.dickinson, Avraham Mahfuda
2020-02-20 21:00:21kmaorksetmessageid: <1582232421.31.0.282697875861.issue39557@roundup.psfhosted.org>
2020-02-20 21:00:21kmaorklinkissue39557 messages
2020-02-20 21:00:20kmaorkcreate