Re: callback and thread
- From: Soeren Sandmann <sandmann daimi au dk>
- To: gtk-app-devel-list gnome org
- Subject: Re: callback and thread
- Date: 02 Nov 2000 12:17:09 +0100
Soeren Sandmann <sandmann daimi au dk> writes:
while (1)
{
Calculation *c;
gpointer r;
c = queue_read (); /* blocks if queue is empty, but that is OK */
r = c->do_calculation (c->data);
gtk_idle_add (c->return_func, c);
}
This should be
while (1)
{
Calculation *c;
c = queue_read (); /* blocks if queue is empty, but that is OK */
c->data = c->do_calculation (c->data);
gtk_idle_add (c->return_func, c);
}
The function c->return_func should be responsible for freeing c.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]