Some question about thread pools
- From: Axel Bock <news-and-lists the-me de>
- To: GTK App devel list <gtk-app-devel-list gnome org>
- Subject: Some question about thread pools
- Date: Sun, 8 Dec 2002 15:31:16 +0100
Hi all,
I want to use thread pools for my app. Now I'm curious whether I did
understand the principle of a thread pool right, or not.
So, I will just line out this in two sentences or so, and *please*
correct me if I should be wrong ... :-)
Well, I have some pice of data arriving occasionally over the net. The
processing of this data takes a quite long time, and so I wanted to give
this data over to a thread pool to deal with this.
I would init the pool with
tp = g_thread_pool_new(func, NULL???, num, TRUE, NULL);
(This seems strange to me - I don't have any user data yet when
initializing the thread pool ... or did I get something wrong here?)
Assuming the init went correct I would push the arriving packets
(the pointers to them ;-) with
g_thread_pool_push(tp, my_pointer, NULL);
to give them some meat.
Please comment and / or correct :-)
Greetings and thanks,
Axel.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]