Re: Button depressing



On Fri, 2006-05-26 at 19:10 -0400, Douglas C. MacKenzie wrote:
> This introduces a race condition, where if the user toggles the
> button while the flag is set you loose the event.  The semantics
> of the boolean need to be "ignore one event" and then the handler
> needs to clear the boolean itself.  Then both events will be
> handled correctly, no matter what order they appear.

it does not create a race condition as long as you adhere to the single-
threaded model that so many of us recommend for GUI programming. in that
condition, all GUI code is serialized and no race conditions exist. I
use this model, and i recommend that everybody else uses this model too.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]