Hi Ian, thank you for your reply.
We're using libpng-1.2.5, zlib-1.2.3, jpeg-6b, microwindows-0.91, and nxlib
0.45. I'm not sure if that answers your "Graphics layer? Window manager...?"
question. My background is embedded systems, not graphics, so the terminology
is new for me.
First, I had to rebuild fltk with the appropriate enable-threads switch to get
Fl:lock/unlock to show up in my library. I'm surprised it worked as well as it
did, without being thread-aware library. I'm now in the process of adding the
lock/unlock pairs everywhere. So far, its not breaking anything. :)
New Questions:
1. You referred me to the 1.1.8 docs. I read chapter 10 but not the whole
thing. How much different is that threading behavior from 1.1.7 which I am
running? Should I upgrade? Are there any compatibility issues I should be
aware of?
2. From the 1.1.8 doc:
> Don't call Fl::wait(), Fl::flush() or any related methods that will
> handle system messages
Can you give me an idea what the "any related methods" are?
3. Before I started all this editing, I had a main that called Fl::run()
and then another thread that called Fl:wait(1.0); in a loop (with other stuff).
After reading your docs I changed main thread to:
Fl:lock();
while (true) // Its embedded so there's no exit
{
Fl:wait();
}
and I got rid of the Fl:wait call in the other thread.
But then I wasn't getting the screen to change the first time I expected it to.
So as an experiment I changed main to
Fl:lock();
while (true) // Its embedded so there's no exit
{
Fl:wait(1.0);
Fl:flush();
}
and it did the trick. Do you have any comments about that?
So far I'm still planning on keeping the show(), hide(), image() and label()
calls in the other threads, protected by the locks. But if necessary, I can do
the awake/message/callback thing so that it is all from main.
Thanks again,
- Lisa
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk