[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Google
  Web www.spinics.net

Re: doubt about thread pool



On 6 December 2011 11:49, Marcelo Elias Del Valle - SYSMAP SOLUTIONS -
Claro MA-SP - <Marcelo.Valle@xxxxxxxxxxxx> wrote:
>        When I call g_thread_pool_push, I pass a pointer to some data I have pre-allocated and that should be processed by the thread. However, when the thread finishes processing it, I need to free this data, outside the thread.
>        How do I do that? Is there a way?

You need to send a message back from the thread saying "I'm done!"

There are many ways to do this, depending on how your program is
structured. For example, g_idle_add() is a very simple thread-safe way
for a worker to get the main GUI thread to call a function.

(this question might be better on gtk-app-devel, for future reference)

John
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list



[GIMP Users]     [Yosemite News]    [Yosemite Photos]    [Gimp's Home]     [Steve's Art]

Add to Google Powered by Linux