Re: New multi-threaded example program in the gtkmm tutorial



Hi, Kjell.  I'm sorry if I were overly verbose.  I won't be a novice in all this for long.  I did a lot of studying between post and have been going over every line of all code examples provided to me to learn as much as I can. 

I understand the frustration some of the advance users might have in reading baby steps of a such a novice.

I had a lot of questions, but held off and have been many hours going over the current tutorials to try to make as much sense as I can.

Your examples are filling in the gaps by far.  I'm glad you invited us to report bugs.  I hope that will include my asking questions... not bugs.

Some of my questions might possibly serve some benefit that might help other novice that are intimated in asking questions, but might also be stuck.

-- L. James

--
L. D. James
ljames apollo3 com
www.apollo3.com/~ljames

On Wed, 2013-08-07 at 10:29 +0200, Kjell Ahlstedt wrote:
The last few weeks we have seen an extremely verbose thread of conversation on gtkmm-list (How to update both the Console and the GTKMM gui window after running other functions). I have not read all the countless posts in that thread of conversation, but it made me aware that the gtkmm tutorial contains a chapter on multi-threaded programs, https://developer.gnome.org/gtkmm-tutorial/stable/chapter-multi-threaded-programs.html.en, but no example program. Now I have added an example program at https://git.gnome.org/browse/gtkmm-documentation/tree/examples/book/multithread. I also added a short explanation in the tutorial. Since it may take some time before that explanation will be easily available on the web, I show it here:

This is an example program with two threads, one GUI thread, like in all gtkmm programs, and one worker thread.
The worker thread is created when you press the Start work button. It is deleted when the work is finished,
when you press the Stop work button, or when you press the Quit button.

A Glib::Dispatcher is used for sending notifications from the worker thread to the GUI thread.
The ExampleWorker class contains data which is accessed by both threads. This data is protected
by a Glib::Threads::Mutex. Only the GUI thread updates the GUI.

If you find bugs in the example program, I'd like to know. I have strived to make it thread-safe.

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list



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