Re: GtkListStore and Threads problems
- From: Peter Bloomfield <peterbloomfield bellsouth net>
- To: Lorena Salinas <lsalinas invap com ar>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GtkListStore and Threads problems
- Date: Tue, 14 Jun 2005 19:01:58 +0000
On 06/14/2005 02:20:16 PM Tue, Lorena Salinas wrote:
Hi,
This is what I do inside the worker_thread function
(create_and_start_worker_thread ()) every time I want to update
the
model:
gdk_threads_enter(); /* get GTK thread lock */
gtk_list_store_set (GTK_LIST_STORE (host_model), &iter,
MYMODEL_COL_STATUS, STATUS_NORMAL,
-1);
gdk_threads_leave(); /* release GTK thread lock
*/
This may not be the cause of your current problem, but in this
code you can't be sure that the GtkTreeIter is valid, because the
lock has been dropped and reacquired. Validating and using an
iter while holding the lock is safer.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]