in reply to Re: multithreads newbie question
in thread multithreads newbie question

BrowserUk:

Perhaps I should remove the phrase "something simple like this" from my post, as your example is complete *and* simpler. I still like mine for the flexibility, though, but yours is a better simple example of how to solve the problem.

...roboticus

Replies are listed 'Best First'.
Re^3: multithreads newbie question
by BrowserUk (Patriarch) on Aug 10, 2010 at 13:13 UTC

    I think the main advantage (I see), of mine over yours is that there can be no race conditions, priority inversions, deadlocks, or any of the other nasties that thread naysayers like to run on about.

    People tend to scoff when I suggest the best way to avoid such things is to not program them.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      BrowserUk:

      Yes, I totally agree. You shouldn't put in junk you don't need for the job at hand.

      I tend to overengineer things, and have to reign myself in. Luckily, when I'm at $work, I spend a bit of time during design phase and explicitly chop out features that aren't supported by the requirements of the job.

      ...roboticus