$NetBSD: patch-af,v 1.2 2005/03/22 16:14:16 jmmv Exp $ --- src/nautilus-main.c.orig 2005-03-07 10:00:15.000000000 +0100 +++ src/nautilus-main.c @@ -57,6 +57,24 @@ #include #include +#ifdef __NetBSD__ +#include + +/* + * 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; @@ -420,6 +438,10 @@ main (int argc, char *argv[]) } else { /* Run the nautilus application. */ application = nautilus_application_new (); + +#ifdef _PTH_PTHREAD_H_ + gtk_timeout_add (200, pth_nbschedule, NULL); +#endif nautilus_application_startup (application, kill_shell, restart_shell, no_default_window, no_desktop,