Re: Threads !!!
- From: Soeren Sandmann <sandmann daimi au dk>
- To: gnome-devel-list gnome org
- Subject: Re: Threads !!!
- Date: 01 May 2002 14:56:56 +0200
Chris <chris starforge co uk> writes:
> How about having a single "worker" thread that does all the updating, and
> all the other threads in your program sent it requests with the instructions
> about what needs to be done and the data to do it? Possible implementation:
In fact, the glib mainloop has good support for this design. Just use
g_idle_add (function_that_does_updating, data). This way only the
thread that runs the mainloop will do any updating. You don't even
have to worry about locking, as g_idle_add() will do the necessary
locking for you.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]