FLTK logo

Re: [fltk.general] Re: Window is frozen

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Re: Window is frozen imm Nov 28, 2021  
 

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/CAGFM6dZOpyHFKehmCCLdJQB%3Dr_Tw5s9N301stRKkkFWXv77WDA%40mail.gmail.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.