On Tue, 2008-02-12 at 16:19 -0500, Vallone, Anthony wrote:
You do not need to call gdk_thread_init()
if you are only invoking GDK/GTK+ functions by message passing via
g_idle_add() (that is, if you are not calling
gdk_threads_enter()/leave()).
That's interesting. g_idle_add() is
Am Montag, den 11.02.2008, 18:19 -0500 schrieb Jacques Pelletier:
On February 11, 2008 05:37:54 pm Vallone, Anthony wrote:
From:
Vallone, Anthony [EMAIL PROTECTED]
To:
gtk-list@gnome.org
Myself, I avoid the enter/leave calls in favor of g_idle_add() as a
mechanism to queue all gui
On Tue, 2008-02-12 at 08:56 -0500, Lindley M French wrote:
Interesting. So g_idle_add can be safely called from a different thread? Does
it have to be a gthread, or will a pthread work as well?
You can use pthreads under glib without problems. For Unix-like
systems, gthreads is only a wrapper
Interesting. So g_idle_add can be safely called
from a different thread? Does it have to be a gthread,
or will a pthread work as well?
I have been using pthreads with g_idle_add for a few years. It seems to
work fine. Just make sure you call g_thread_init(NULL) before
gtk_main().
I've
On Tue, 2008-02-12 at 20:24 +, Chris Vine wrote:
On Tue, 2008-02-12 at 08:56 -0500, Lindley M French wrote:
Interesting. So g_idle_add can be safely called from a different thread?
Does it have to be a gthread, or will a pthread work as well?
You can use pthreads under glib without
a nice discussion (with examples) of all this here:
http://irrepupavel.com/documents/gtk/gtk_threads.html
and, g_idle_add() is indeed thread safe. it was written that way, on
purpose. there's really no mystery to a function being thread-safe or not,
either it was written intended to be, or it
You do not need to call gdk_thread_init()
if you are only invoking GDK/GTK+ functions by message passing via
g_idle_add() (that is, if you are not calling
gdk_threads_enter()/leave()).
That's interesting. g_idle_add() is thread safe without telling it to
use mutex locking? Based on the
Hi,
I'm interested to know more about that.
Is there some source code example that I can follow?
--
JP
The pattern that Mathias supplied is a good one for C. Since we are
talking STL, here is a rough sketch of the pattern that I follow for
C++. Of course, there are many good ways to do
use STL and GTK+ together. Never had a problem.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Lindley M French
Sent: Monday, February 11, 2008 5:23 PM
To: gtk-list@gnome.org
Subject: Re: Does gtk have issues with STL?
I had already figured out
[EMAIL PROTECTED]
Date: Monday, February 11, 2008 4:49 pm
Subject: Re: Does gtk have issues with STL?
On Mon, 2008-02-11 at 15:45 -0500, Lindley M French wrote:
I suspect these are merely symptoms of some other corruption,
but I can't seem to find it.
with a 99.872% confidence level, i
On Mon, 2008-02-11 at 15:45 -0500, Lindley M French wrote:
I suspect these are merely symptoms of some other corruption, but I can't
seem to find it.
with a 99.872% confidence level, i can confirm your belief.
I'm using pthreads with this; nothing complex, and I think I have everything
: Does gtk have issues with STL?
If it's not completely impractical, you might consider debugging
on
Linux a bit - there you can use Valgrind (probably worth the
effort to
port it over just for that, if it takes less than several days),
and if
you're multi-threaded, Helgrind (get
On Mon, 2008-02-11 at 17:08 -0700, Michael L Torrie wrote:
Paul Davis wrote:
EITHER make GTK/GDK/X11 calls from a single thread only OR
use GDK_THREADS_{ENTER,LEAVE} around every (group of) GTK/GDK/X11
call(s).
This seems to crop up all the time. From what I recall, the use of
Paul Davis wrote:
EITHER make GTK/GDK/X11 calls from a single thread only OR
use GDK_THREADS_{ENTER,LEAVE} around every (group of) GTK/GDK/X11
call(s).
This seems to crop up all the time. From what I recall, the use of
threads of any kind with GTK on Win32 is not supported, even with
On Mon, 11 Feb 2008, Paul Davis [EMAIL PROTECTED] wrote :
the use of threads in GUI toolkits that originated in the X Window world
is generally quite difference than the use of it with GUI toolkits that
originated in the win32 world.
Actually I never noticed the difference, because my exposure
On February 11, 2008 05:37:54 pm Vallone, Anthony wrote:
From:
Vallone, Anthony [EMAIL PROTECTED]
To:
gtk-list@gnome.org
Myself, I avoid the enter/leave calls in favor of g_idle_add() as a
mechanism to queue all gui calls for the main event loop thread. Let
your other threads stick to
The instability I was seeing before might have been due to my use of an STL map
to maintain my list of available windows. Is this a known issue, or should I be
looking elsewhere?
I'm suspicious because several of the errors I've gotten (they're different
each time, even if I don't recompile)
On Fri, 2008-02-08 at 10:44 -0500, Lindley M French wrote:
The instability I was seeing before might have been due to my use of an STL
map to maintain my list of available windows. Is this a known issue, or
should I be looking elsewhere?
I'm suspicious because several of the errors I've
gtk have issues with STL?
On Fri, 2008-02-08 at 10:44 -0500, Lindley M French wrote:
The instability I was seeing before might have been due to my
use of an STL map to maintain my list of available windows. Is
this a known issue, or should I be looking elsewhere?
I'm suspicious
19 matches
Mail list logo