D threading and shared variables
Archie Allison
archie_allison at compuserve.com
Sun Apr 7 14:49:20 UTC 2019
On Sunday, 7 April 2019 at 14:35:24 UTC, Doc Andrew wrote:
> When you say it "rarely works" when run as a GUI app (vs
> console), it makes me think that there's probably a race
> condition going on, and the extra context switching that takes
> place in GUI mode makes it more likely. I haven't tried it in
> D, but you may be able use Application Verifier with your app
> to add checks for lock contention. Without more information
> about the way your threads are synchronized it's hard to say
> for sure though.
The codebase is a reasonable size so too big (and proprietary) to
share.
It's always run with a GUI (GTKD), it's just the difference in
linking so launching (a)GUI + attached console for stdout.writeln
vs. (b)just the GUI window. There's nothing I'd expect to cause
races or deadlocks.
More information about the Digitalmars-d-learn
mailing list