$NetBSD: patch-ab,v 1.1.1.1 2004/01/04 21:39:51 rh Exp $

--- mail/main.c.orig	Sat Sep 14 02:53:20 2002
+++ mail/main.c
@@ -36,6 +36,26 @@
 #include "mail.h"
 #include "mail-mt.h"
 
+
+#ifdef __NetBSD__
+#include <gtk/gtk.h>
+#include <pthread.h>
+
+/*
+ * Pth is non-preemptive, so we yield the processor periodically
+ */
+
+#ifdef _PTH_PTHREAD_H_
+static gint
+pth_nbschedule (gpointer data)
+{
+	sched_yield();
+
+	return TRUE;
+}
+#endif /* _PTH_PTHREAD_H_ */
+#endif /* __NetBSD__ */
+
 /*#define DO_MCHECK*/
 
 #ifdef DO_MCHECK
@@ -156,6 +176,10 @@ main (int argc, char *argv [])
 	
 	g_print ("Evolution Mail ready and running.\n");
 	
+#ifdef _PTH_PTHREAD_H_
+	gtk_timeout_add (200, pth_nbschedule, NULL);
+#endif
+
 	GDK_THREADS_ENTER ();
 	bonobo_main ();
 	
