Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Shutdown procedure by clicking red x
Re: Shutdown procedure by clicking red x [message #30374 is a reply to message #30333] Mon, 27 December 2010 04:13 Go to previous messageGo to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
mutex ~ mutual exclusion
No variables are shared or assessable between the two threads so that is not an issue.
I see you have StaticMutex but only one thread other than the main thread, I guess they could be both using the same variable at the same time.

PostCallBack ~ this thread gets into it but as mentioned above the data is not shared between the two worker threads
http://www.ultimatepp.org/forum/index.php?t=msg&goto=105 45&

I did look at this:
"I am not expert in threads, but it seems you use gui inside your threads. It would be better to be in main program."
http://www.ultimatepp.org/forum/index.php?t=msg&goto=298 57&
The two threads each use data from seperate GPS receivers and modify the content of seperate EditFields. The main thread can modify the format it is displayed in.
Sigq<<=Sigq;
Location<<=Lat + "," + Lon + "," + fAlt;
This works OK changing the data in the threads rather than in main.

atomic ~ concurrent reads and writes ~ a thread in my case does not read/write the other threads variables.

note: As far as error handling after about an hour the count for each GPS receiver may vary, I don't use the checksum for each sentence but as long as the Lat, Lon and Alt are OK it is used, otherwise it is skipped. It will not exit the app if a sentence is bad/skipped or missing.

Neil

[Updated on: Mon, 27 December 2010 04:47]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Copy\Paste Between Project Files Doesn't work
Next Topic: Error meaning
Goto Forum:
  


Current Time: Sat Jul 05 04:42:55 CEST 2025

Total time taken to generate the page: 0.02867 seconds