Menu

threadsafety

Help
2002-01-14
2002-01-14
  • Jason Fischl

    Jason Fischl - 2002-01-14

    There is a comment in the TODO stating, "all log calls are thread safe, others are 'mulithread prepared' ".

    After looking through the source code, this does not appear to be the case. I don't see any evidence that the calls have been made thread safe. Am I missing something?

     
    • Bastiaan Bakker

      Bastiaan Bakker - 2002-01-14

      No, you're not missing something. log4cpp lacks full thread safety. It is safe to do log calls to the same category from multiple threads concurrently. Also almost all Appender implementations are written in such a way that they append safely (ie. don't interleave log message fragments) if the underlying OS call (e.g write() or syslog()) is atomic.
      True thread safety (problably using the Boost thread library) is planned for release 0.3.0.

      Bastiaan

       

Log in to post a comment.

MongoDB Logo MongoDB