$NetBSD: patch-af,v 1.5 2009/03/16 14:05:04 jmcneill Exp $

--- src/nautilus-main.c.orig	2009-02-17 05:50:24.000000000 -0500
+++ src/nautilus-main.c
@@ -65,6 +65,24 @@
 #include <exempi/xmp.h>
 #endif
 
+#ifdef __NetBSD__
+#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__ */
+
 /* Keeps track of everyone who wants the main event loop kept active */
 static GSList *event_loop_registrants;
 
@@ -505,6 +523,10 @@ main (int argc, char *argv[])
 		if (egg_sm_client_is_resumed (application->smclient)) {
 			no_default_window = TRUE;
 		}
+
+#ifdef _PTH_PTHREAD_H_
+		gtk_timeout_add (200, pth_nbschedule, NULL);
+#endif
 		
 		nautilus_application_startup
 			(application,
