Hi,

Some time ago I tried the Dispatcher concept. Here is my solution (not perfect 
but demonstrating the spirit of dispatcher and threads): 

        startstop.glade: xml file defining the window
        startstop.cc: c++ source code...
        b.cygwin: a script that make the project under cygwin
        b.linux: a script that make the project under linux

I hope it will help you!


>>> [EMAIL PROTECTED] 04/12 12:01 pm >>>
Send gtkmm-list mailing list submissions to
        [email protected] 

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.gnome.org/mailman/listinfo/gtkmm-list 
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED] 

You can reach the person managing the list at
        [EMAIL PROTECTED] 

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gtkmm-list digest..."


Today's Topics:

   1. Re: Use of threads with gtkmm. (Fredrik Arnerup)


----------------------------------------------------------------------

Message: 1
Date: Tue, 12 Apr 2005 15:31:38 +0200
From: Fredrik Arnerup <[EMAIL PROTECTED]>
Subject: Re: Use of threads with gtkmm.
To: Paul Davis <[EMAIL PROTECTED]>
Cc: [email protected] 
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1

On m�n, 2005-04-11 at 14:17 -0400, Paul Davis wrote:
> >This excerpt from the FAQ sounds like what I'm after:
> >"or alternatively, ensure that only a single thread makes such calls.
> >One common way to do this is to have non-GUI threads send requests to
> >the GUI thread via a pipe. The pipe is hooked into the main glib event
> >loop used by GTK."
> >
> >But I've been unable to find any simple example code for this. Could anyone
> >provide a brief example?
> 
> there is no brief example. there's no "brief" way to do it. i would
> point at Ardour's ViewCVS system, but the code there is complicated by
> the fact that the code used has to be real-time safe, which will make
> it much harder for you to understand how it works.

There is a brief way. Use Glib::Dispatcher, which is a asynchronous
signal that uses a pipe. I'm not sure if there is an example program,
but this is a very common question.

-- 
Fredrik Arnerup <[EMAIL PROTECTED]>



------------------------------

_______________________________________________
gtkmm-list mailing list
[email protected] 
http://mail.gnome.org/mailman/listinfo/gtkmm-list 


End of gtkmm-list Digest, Vol 12, Issue 19
******************************************

Attachment: startstop.cc
Description: Binary data

Attachment: startstop.glade
Description: Binary data

Attachment: b.cygwin
Description: Binary data

Attachment: b.linux
Description: Binary data

_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to