Re: [Newbie] How to wait for asyncronous input

2012-08-11 Thread Steven D'Aprano
On Sat, 11 Aug 2012 11:24:48 +0200, Hans Mulder wrote: > On 11/08/12 09:07:51, pozz wrote: >> When the main thread wants to close the serial port, the receiving >> thread can be killed > > > How would you do that? > > IFAIK, there is no way in Python to kill a thread. Correct. > The usual wo

Re: [Newbie] How to wait for asyncronous input

2012-08-11 Thread Hans Mulder
On 11/08/12 09:07:51, pozz wrote: > 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() b

Re: [Newbie] How to wait for asyncronous input

2012-08-11 Thread pozz
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 o