]> git.notmuchmail.org Git - notmuch/blobdiff - lib/thread.cc
lib/thread: add macro for debug printing of threading
[notmuch] / lib / thread.cc
index b599a97d445ec1cd5a5efbe647f85ae2f95efb8a..6d15c49b761b2fc81e36a1f2adfd8e6c07dff4e7 100644 (file)
 #include <gmime/gmime.h>
 #include <glib.h> /* GHashTable */
 
+#ifdef DEBUG_THREADING
+#define THREAD_DEBUG(format, ...) fprintf(stderr, format " (%s).\n", ##__VA_ARGS__, __location__)
+#else
+#define THREAD_DEBUG(format, ...) do {} while (0) /* ignored */
+#endif
+
 #define EMPTY_STRING(s) ((s)[0] == '\0')
 
 struct _notmuch_thread {