Am 06.05.2009 14:55 Uhr schrieb "MacArthur, Ian (SELEX GALILEO, UK)" unter
<[email protected]>:
>
>> Can anyboby explain me why do I get this kind of error?
>> Fl::lock();
>> //do smth
>> Fl::unlock();
>> //do smth
>> Fl::flush();
>
> The use of lock() and unlock() imply that this is threaded code. Is it?
>
> In particular, you can only safely call Fl::flush() from the "main"
> thread (i.e. the thread of execution in which the fltk main loop
> resides, which ideally should be the thread that contains your main()
> entry point.)
>> From a subsidiary thread, you should call Fl::awake() instead, never
> Fl::flush(), so that looks like an outright error.
Wow, Ian, you are right. I did not see it, even after staring at the code
;-)
Fl::flush() should actually be Fl::awake() in this context. That may be all
that is to this bug.
Matthias
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk