Serial connections and threads in a GUI

sturlamolden sturlamolden at yahoo.no
Wed Sep 30 02:02:52 CEST 2009


On 29 Sep, 23:56, Aaron Hoover <ahoo... at eecs.berkeley.edu> wrote:
> how can I allow the thread  
> access to the connection for reading, but then have it give up control  
> over the connection when it's done so the main GUI thread can access  
> the connection again for writing?

Protect read/write access to the serial port with a lock.

Or use Candygram to pass Erlang-style messages to and from the thread
owning the serial port.
http://candygram.sourceforge.net/






More information about the Python-list mailing list