Shop OBEX P1 Docs P2 Docs Learn Events
nerdDoro semaphore lock — Parallax Forums

nerdDoro semaphore lock

JeffaJeffa Posts: 80
edited 2011-07-29 17:52 in Accessories
Wow! Fun! I implemented semaphore locks on the read of the Sensirion and the RTC. What a difference it has made in the stability of the LCD display and the consistency of the XML output.

Check out the before and after shots of the ndXml a c# application that reads the XML data once a minute and persists to an SQL db.

Note the caught exceptions in this screenshot before I implemented the semaphore locks

ndXmlExceptionCapture.PNG


And after. Wish I would have picked up on the clue that once I moved the LCD update functions into their own cog nerdDoro became unstable. Looking much better now!

ndXmlAfterLocksCapture.PNG


This is over 1.5 hours of reads for about 100 records without an error. It's never gone more than say maybe 15 reads previously without an error.

I had never written any cognew or lockset code before. Now that it's done I can say fun, but wow I sure spent a lot of time wondering. So maybe I will be able to document this and enter the contest.

I've updated the github repository https://github.com/jhalbrecht/nerdDoro and cleaned up a lot of code and documented the source code.

c ya... - jeffa
640 x 800 - 139K
677 x 1038 - 181K
Sign In or Register to comment.