Il 11/08/2012 01:12, Dennis Lee Bieber ha scritto:
What you apparently missed is that serial.read() BLOCKs until data is available (unless the port was opened with a read timeout set). [...]serial.read() may, there for, be using select() behind the scenes.
Hmm..., so I could open the serial port with timeout=0 so the read(), that runs in a different thread, would block forever, so putting the thread in a sleep state until some bytes arrive.
When the main thread wants to close the serial port, the receiving thread can be killed (I don't know why, but I think it will be possible).
-- http://mail.python.org/mailman/listinfo/python-list
