bazillion stepstones with multithreading...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lars Uffmann

    #1

    bazillion stepstones with multithreading...

    <- about to have a major crisis here.

    All I wanted is to create a little tool with a GUI. Now I see problems
    related to thread programming arising everywhere. If I use the GUI to
    set a flag as a stop condition checked by my thread, but reset the flag
    when the user wants to restart the thread, then technically I could run
    into a problem with the original thread never noticing it was supposed
    to end in the first place, and then I have 2 threads with the same
    routine running at the same time, creating lots and lots of unwanted
    race conditions.

    Does anyone have a link to a good writeup on thread programming
    philosophy? How to set up GUI applications and avoid race conditions,
    for example upon writing/reading properties of wxWidgets components? Do
    I have to use a mutex object for every single control element that is
    manipulated by more than just 1 thread?

    Best Regards,

    Lars
Working...