CrystalFontz 635 project

Scott Flynn scott at starlon.net
Thu Apr 16 06:09:24 CEST 2009


I think I found the answer to the last question. "A primitive lock is
a synchronization primitive that is not owned by a particular thread
when locked." -17.2.2. Lock Objects

So that's a no.

On Wed, Apr 15, 2009 at 8:55 PM, Scott Flynn <scott at starlon.net> wrote:
>
> I'm finally around to playing around with my LCD module. I chose Linux for OS, pygtk for the GUI, a CF635 Python library written by Thomas Cauley (found on CF website) for a starting point in sending commands to the LCD, and gobject.io_add_watch for listening for packets coming from the LCD. It became clear as soon as I started receiving packets that I would need some threading support. My attempts at working that in have been successful to some degree, but there's still something, and while I doubt many can run the program to see what it does, I was hoping someone could possibly tell me if I'm just going about this threading business "the wrong way."
>
> You can download the files from http://starlon.net/files/CF635.1.tar.gz
>
> Pertinate files: CF635.py (main file), CFListener.py, CFFans.py, pyCF635Driver.py
>
> Basically, when I set a fan or more to report, the packets come in fine and the program processes them, but every once in a while the GUI hangs. I'm not sending commands to the LCD during this time. I'm just letting the program run. I realize outgoing commands aren't wrapped/threaded yet. I'm not sure if they need to be. I have a threading.Lock setup in SendCommand though, so I'm also wondering if I need the threading.



More information about the Python-list mailing list