[Mapguide-trac] [mapguide-trac] #2076: mg-desktop: Make logging single-threaded

MapGuide Open Source trac_mapguide at osgeo.org
Wed Jul 18 08:09:13 PDT 2012


#2076: mg-desktop: Make logging single-threaded
---------------------------+------------------------------------------------
   Reporter:  jng          |       Owner:  jng
       Type:  task         |      Status:  new
   Priority:  low          |   Milestone:     
  Component:  Desktop API  |     Version:     
   Severity:  trivial      |    Keywords:     
External_id:               |  
---------------------------+------------------------------------------------
 The logging facilities which we grafted from the MapGuide Server codebase
 operates on a background thread. Logger calls actually queue up log
 requests to the background logger thread.

 This design is great for a server-based application, but is problematic
 for desktop applications as the logger thread may cause access violations
 on application exit, even though we've instructed the logger thread to
 stop. Any access violations on an exit of an mg-desktop application is due
 to this particular problem.

 This problem should be work-aroundable by making the logging single-
 threaded. That is: logger calls write the message to the file directly
 instead of being queued up for writing to the file by the logger thread.
 This way, there is no un-wieldy logger thread to deal with upon the call
 to MgPlatform.Terminate()

 For desktop applications, such overhead of not queuing logger calls to a
 background thread should be negligible.

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/2076>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list