Re: Use worker thread to call Fl_Window and Fl_run
"anmol....
Oct 25, 2020
Could Ian and Greg kindly comment on main_gui_on_secondary.cpp ? This program uses fl_create_thread and the worker thread starts the progress window and calls Fl::run().
Why is this working ? From my example, (no longer a progress bar but a more complex UI), I get a crash when the user closes the window if started from a worker thread.
On Friday, October 2, 2020 at 2:49:42 AM UTC+5:30 lifeatt...@gmail.com wrote:
As requested, I'm attaching a sample of my message based thing. Updates the progress bar once a second.
Probably not useful to the OP, as it uses a secondary thread. Also probably not the best example, as I've not tried Ian's suggestion of Fl::awake.
Variant 1: main_gui_on_main.cpp : GUI is running on the main thread, work in secondary thread
Variant 2: main_gui_on_secondary.cpp : Work is performed on main thread, GUI is running on a secondary thread.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.