Re: Multiple threads: one interface
- From: G Hasse <gh raditex se>
- To: David Smith <DavidSmith byu net>
- Cc: <gtk-app-devel-list gnome org>
- Subject: Re: Multiple threads: one interface
- Date: Tue, 10 Dec 2002 01:16:45 +0000 (GMT)
On 9 Dec 2002, David Smith wrote:
I've narrowed the problem down to the fact that I am calling
gtk_widget_draw, which appears to be colliding with gtk_main somehow.
I've surrounded the call with gdk_threads_enter() and
gdk_threads_leave(), but I still get xlib errors (unexpected async
reply). Anyone know how I can safely refresh a gtk_tree_view from a
thread?
The use of threads is not necessary at all.
Register a callback to be ececuted every second to do the
cleanup.
callbackFunction( prtToUserData )
{
/* do cleanup ... and keep i snappy! */
}
gtk_timeout_add( 1000, (GtkFunction) callbackFunction , ptrToUserData );
Take a look at the radar receiver interface at
http://www.microdata.se/swdemo.htm thar we have written.
It is possible to write snappy userinterface without using threads.
GH
----------------------------------------------------------------
Göran Hasse email: gh raditex se Tel: 08-6949270
Raditex AB http://www.raditex.se Fax: 08-4420570
Sickla Alle 7, 1tr Mob: 070-5530148
131 34 NACKA, SWEDEN
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]