Re: GThreads and GThreadPool help for a dummy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/7/23 richard boaz <ivor.boaz@xxxxxxxxx>:
> 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
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux