
#include <gtk/gtk.h>

#define NUM 100

static void thread_func(gpointer data, gpointer udata)
{
	GtkObject *adj = gtk_adjustment_new(0, 0, 0, 0, 0, 0);
	g_object_ref_sink(adj);
	g_object_unref(adj);
}

int main(void)
{
	GThreadPool *tpool;
	gint i;

	g_thread_init(NULL);
	gtk_init(NULL, NULL);

	tpool = g_thread_pool_new(thread_func, NULL, -1, FALSE, NULL);

	for (i = 0; i < NUM; ++i)
		g_thread_pool_push(tpool, GINT_TO_POINTER(-1), NULL);

	g_thread_pool_free(tpool, FALSE, TRUE);

	return 0;
}
