|
|
As for lock and unlock, they kind of work? The window is very laggy and takes some time to update. After the thread finishes executing it appears that the window is completely frozen.
On Sunday, November 28, 2021 at 3:43:51 AM UTC-8 Ian MacArthur wrote:
On Sun, 28 Nov 2021, 10:39 Manolo wrote:
To call Fl_Browser::add() from a worker thread, you have to call Fl::lock() before and Fl::unlock() after.
See an example of how it's done in demo program test/threads. Also, make sure you follow guidelines given in :
Yes, as Manolo says, the crux is that the render context on WIN32 is basically single threaded and can only safely be accessed from the main thread of each process.
So to access rendering from a worker thread, you need to lock, or (better) use the FL::awake callback mechanism. -- Ian From my Fairphone FP3
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/930e721d-4742-41ba-9fb5-24bde3274b5en%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |