Hi List, I am busy working on integrating the c-client library with an application, for the moment just to use the MIME parser but it will be extended to use IMAP.
The application is threaded so I was looking to see how thread-safe the library is. In general, it looks as if it will be okay if I'm careful (e.g. don't manipulate driver parameters from a thread), but there are a couple of places where race conditions could occur. For example, there is code at the start of unix_header() which populates a global STRINGLIST if it hasn't been done before. I'm a bit stuck for what to do here as I don't want to modify the library code, and I don't want to stick a big lock around all calls into it, is there any recommended way around this ? If I were to modify the code, I'd move the 'once only code' out of the unix_header() function into one called build_unix_hlines() or something then I could just call this from my application before going threaded. Any thoughts appreciated, Thanks, Andy -- ------------------------------------------------------------------ For information about this mailing list, and its archives, see: http://www.washington.edu/imap/c-client-list.html ------------------------------------------------------------------
