Document that libexif is now thread safe (when used appropriately).
authorDan Fandrich <dan@coneharvesters.com>
Wed, 19 Nov 2008 08:14:44 +0000 (00:14 -0800)
committerDan Fandrich <dan@coneharvesters.com>
Wed, 19 Nov 2008 08:14:44 +0000 (00:14 -0800)
Also, clarify the string encoding issue since gettext takes care of converting
strings into the appropriate locale's encoding.

ChangeLog
NEWS
libexif/exif.h

index ea33a2c..b350800 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
 2008-11-18  Dan Fandrich <dan@coneharvesters.com>
 
        * libexif/exif-entry.c & configure.ac: use localtime_r when available
-         to be more thread safe
+         to make libexif thread safe
        * po/nl.po: Updated Dutch translation by Erwin Poeze
        * po/pl.po: Updated Polish translation by Jakub Bogusz
        * contrib/examples/*: Added a couple of simple example programs
diff --git a/NEWS b/NEWS
index 494df1c..048f472 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,9 @@
 libexif-0.6.x:
   * Updated translations: nl, pl
   * Added some example programs
+  * libexif is now thread safe when the underlying C library is thread safe
+    and when each object allocated by libexif isn't used by more than one
+    thread simultaneously
 
 libexif-0.6.17 (2008-11-06):
   * Updated translations: cs, de, pl, sk, vi
index da29bce..9f490ae 100644 (file)
@@ -1,7 +1,7 @@
 /*! \file exif.h exif/exif.h
- * \brief Dummy header file
+ * \brief Dummy header file for documentation purposes
  * \date 2007
- * \author Hans Ulrich Niedermann
+ * \author Hans Ulrich Niedermann, et. al.
  *
  * \mainpage The libexif library
  *
  *
  * \section string_conventions String Conventions
  *
- * Strings of 8 bit characters ("char*"). Character set and encoding
- * are currently undefined, but that will change in the future.
+ * Strings of 8 bit characters ("char*"). When libexif is compiled with
+ * NLS, character set and encoding are as set in the current locale,
+ * except for strings that come directly from the data in EXIF
+ * tags which are returned in raw form.
  *
  * \section memory_management Memory Management Patterns
  *
  * 
  * \section thread_safety Thread Safety
  * 
- * FIXME: Good question. Needs to be determined.
+ * libexif is thread safe when the underlying C library is also thread safe.
+ * Some libraries may require defining a special macro (like _REENTRANT)
+ * to ensure this, or may require linking to a special thread-safe version of
+ * the library.
+ *
+ * The programmer must ensure that each object allocated by libexif is only
+ * used in a single thread at once. For example, an ExifData* allocated
+ * in one thread can't be used in a second thread if there is any chance
+ * that the first thread could use it at the same time. Two threads
+ * can use libexif without issues if they never share handles.
  *
  */