#ifdef G_OS_WIN32
#include <fcntl.h> /* For _O_BINARY used by pipe() macro */
+#include <io.h> /* for _pipe() */
#endif
#define ITERS 10000
return TRUE;
}
-void
+gpointer
adder_thread (gpointer data)
{
GMainContext *context;
GIOChannel **channels = data;
AddrData addr_data;
- context = g_main_context_get (g_thread_self());
+ context = g_main_context_new ();
g_mutex_lock (context_array_mutex);
g_mutex_unlock (context_array_mutex);
cleanup_crawlers (context);
+
+ return NULL;
}
void
sub_channels[0] = in_channels[0];
sub_channels[1] = out_channels[1];
- g_thread_create (adder_thread, sub_channels, 0,
- FALSE, TRUE, G_THREAD_PRIORITY_NORMAL, &err);
+ g_thread_create (adder_thread, sub_channels, FALSE, &err);
if (err)
{