On 16Jul2018 08:33, Thomas Jollans <t...@tjol.eu> wrote:
On 16/07/18 08:24, Gerlando Falauto wrote:
On Monday, July 16, 2018 at 8:13:46 AM UTC+2, Thomas Jollans wrote:
On 16/07/18 07:39, Gerlando Falauto wrote:
On Monday, July 16, 2018 at 6:56:19 AM UTC+2, dieter wrote:
...
Why is the main thread taking up so much CPU?
I believe at this point listener.stop() should only be waiting for the helper 
thread to terminate, which I reckon would be implemented by waiting on a 
semaphore or something (i.e. iowait i.e. 0% CPU).

Presuming you're using Linux on the Pi, the strace command will show you exactly what system calls the processis making. A real spin lock situation will be very apparent. 100% CPU with no system calls means a busy wait (polling).

Strace is an outstandingly useful and often overlooked tool for debugging otherwise opaque behaviour.

Cheers,
Cameron Simpson <c...@cskk.id.au>
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to