Hello,
I wish you soummettre a small problem in the use of threads under
Linux and Windows, a slightly different behavior.
Fltk 1.1.9 , linux Mandriva and Windows XP (Cygwin)
In summary I have a function (a callback) that launches a thread that
performs a
http connection and retrieve the result. I print in this thread in a
popup window the progress of the download.
Under linux it is as follows,
function mycallback() {
...
call thread()
}
function mythread() {
...
popup->show();
...
while(1) { // recv packets
...
Fl::lock();
popup->set(stats); // transfert progress
Fl::unlock();
Fl::awake();
...
}
...
}
Under Windows I managed to get this same result, noting that the use of
"Fl::lock" ... lock the thread, and that the popup-> show() does not
appear if it
called in the thread
function mycallback() {
...
popup->show();
call thread()
}
function mythread() {
...
...
while(1) { // recv packets
...
popup->set(stats); // transfert progress
Fl::awake();
...
}
...
}
It works but I would like to know if this is a good solution.
Thank you for your advice.
Patrick
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk