[mkgmap-dev] [Patch v1] set program return code and improve logging
From WanMil wmgcnfg at web.de on Tue May 6 21:50:28 BST 2014
> On 06/05/14 10:24, Gerd Petermann wrote: >> @WanMil, Steve: Please review. >> In Main.java I use "synchronized" to make sure that concurrent updates >> are handled. > > The synchronized is not required, since int accesses are atomic and it > appears that all changes to it are made via the same thread anyway. Mmmh, I have to do some nit picking: int variables need to be defined as volatile if they are accessed from multiple threads. Otherwise it is not ensured that they contain the latest change by another thread: http://www.javamex.com/tutorials/synchronization_volatile.shtml Anyhow if it is accessed and changed by one thread only it must not be declared as volatile :-) WanMil > > ..Steve
- Previous message: [mkgmap-dev] [Patch v1] set program return code and improve logging
- Next message: [mkgmap-dev] splitter r325: improved split algo and new option
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list