FLTK logo

Re: [fltk.coredev] RFC: Fl::enable_locks()

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.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: RFC: Fl::enable_locks() Bill Spitzak Apr 18, 2021  
 
The most important unlock is when the main thread is not doing anything and waiting for events. This is done internally by fltk. After an event comes in it re-locks before doing anything with the event. You absolutely do not want the lock held all the time it waits for an event, that would defeat the entire purpose.

On Sun, Apr 18, 2021 at 7:04 AM Michael Sweet <michael.r.sweet@gmail.com> wrote:
Bill,

> On Apr 17, 2021, at 2:08 PM, Bill Spitzak <spitzak@gmail.com> wrote:
> ...
> Starting out "already locked" makes it difficult to make procedures that can be used by different threads and want to unlock fltk.

Can you provide an example? Given the example for using threading:

    Fl::lock();
    Fl::run();

Fl::run() starts with things already locked...

________________________
Michael Sweet



--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/649B330D-C92B-441B-B9A0-E8E46EF8260A%40gmail.com.

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/CAL-8oAjrphCOMk9b8SoKmn3XGxZJKCxiDJiFxhwWzpWVwvRxdg%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'.