Re: [gtkmm] 2 mainloops in 2 different threads?
- From: Paul Davis <pbd op net>
- To: Stephan Puchegger <puchs ap univie ac at>
- Cc: Martin Schulze <MHL Schulze t-online de>, gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] 2 mainloops in 2 different threads?
- Date: Wed, 18 Sep 2002 17:46:20 -0400
>The situation is a bit complicated: The library is attached to a database,
>that contains the current parameters of nuclear physics accelerator. It
>gets updates about 10 times a second. The library is a layer to be easily
>able to manipulate and control the parameters via this database. This
>layer consists of objects, that represent certain parameters in the
>database. The library should keep the values of this objects up to date
>via a tcp/ip link in the 2nd thread, while the the 1st thread does
>wantever the user/programmer wants it to do (changing parameters,
>...) without having to think about the connection to the database itself.
>This may not be the best implementation, but at least it is a challenge
>(and I am going to learn something).
>
>I tried Glib::Dispatcher but found another problem here: It only attaches
>to the default MainContext. And my Program has two different MainLoops and
>thus 2 different MainContexts. I have written another posting to the
>mailing list with a proposal to extend Glib::Dispatcher and added a short
>patch (or what I believe to be a patch). Perhaps it is acceptable.
this sounds like a standard everyday scenario for
Model-View-Controller programming. I don't understand why you have two
main loops.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]