Successful messages via mq to main thread.
[trust_router.git] / tr / tr_event.c
index c637d94..452dea9 100644 (file)
@@ -1,4 +1,5 @@
 #include <event2/event.h>
+#include <event2/thread.h>
 
 #include <tr.h>
 #include <tid_internal.h>
@@ -7,11 +8,12 @@
 
 /* Allocate and set up the event base, return a pointer
  * to the new event_base or NULL on failure.
- * Does not currently enable thread-safe mode. */
+ * Enables thread-safe mode. */
 struct event_base *tr_event_loop_init(void)
 {
   struct event_base *base=NULL;
 
+  evthread_use_pthreads(); /* enable pthreads support */
   base=event_base_new();
   return base;
 }