How to use two threads (GUI and backend)

Chris Angelico rosuav at gmail.com
Thu Oct 27 08:02:12 EDT 2016


On Thu, Oct 27, 2016 at 10:56 PM, pozz <pozzugno at gmail.com> wrote:
> Yes of course, but when the backend thread calls the *blocking* function
> pyserial.read(), it *doesn't* consume CPU clocks (at least, I hope).
> The low-level implementation of pyserial.read() should move the thread in a
> "suspend" or "waiting" state, so the thread scheduler shouldn't activate it.
> The suspend state is exited (automatically from OS, I think) when one or
> more bytes are ready in the input buffer.

Exactly.

ChrisA



More information about the Python-list mailing list