Re: GThreads and GThreadPool help for a dummy
- From: Øystein Schønning-Johansen <oystein gnubg org>
- To: richard boaz <ivor boaz gmail com>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: GThreads and GThreadPool help for a dummy
- Date: Sat, 24 Jul 2010 14:45:24 +0200
2010/7/23 richard boaz <ivor boaz gmail com>:
> this is how i do it (not using pools), i have modified my code for your
> purposes, though it's probably wrong somewhere in the implementation details
> (i didn't even compile it), but i leave that to you.
> this is very easily generalizable to do any kind of background work on a
> "list" of items.
Thanks for the code. I'll try it out. I think the pool code in glib
works similar, except that it uses an asynchronous queue.
However back to my code:
pool = g_thread_pool_new( my_calc, (gpointer) &common, 8, FALSE, &err );
for (i = 0; i < n_tot; i++ )
g_thread_pool_push( pool, &store[i], &err );
g_thread_pool_free( pool, FALSE, TRUE );
Why doesn't the g_thread_pool_free function stop and wait for all
threads. I really specify this to wait (the third parameter is wait_
and set TRUE). In my understanding this must then be a bug in glib.
Should I fill in a bug report?
-Øystein
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]