Summary: Recursive logging sanity check not thread-safe
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Fri 25 May 2012 03:48:35 AM EEST
                Category: general
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None
         Planned Release: 



Check against recursive log-calls has been added to logging module. It works
by setting static variable TRUE when first entering logging function, and
FALSE when leaving. Recursive call would detect if variable is already set and
so know that it's indeed recursive one.
Problem is that this prevents *any* kind of simultaneous logging calls, not
only those that are recursive. Second kind of simultaneous call we encounter
is one from another thread. I noticed this with threaded ai, but in theory
this could cause problems with metaserver communication threads too.


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to