Re: [gtkmm] 2 mainloops in 2 different threads?



Thanks for the reply!

I must admit, that my statement about the static functions is complete
bogus. Sorry, I should study the header + cc files more closely and ask
dumb questions afterwards.

Thanks for the answer to the second question. This was not obvious to me.

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.


	Thanks a lot for the response!

		Stephan






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]