• Anon (unregistered)

    Due to locking issues the post becomes "FirFirst!st!"

  • Anon (unregistered)

    I regret clicking on a specific word in the article.

  • Oliver Jones (google)

    Time for a WTF or two about devs who don't understand floating point, and other things that should have made them flunk CS201.

  • Dude (unregistered)

    One of my coworkers insisted something like this would work for locking threads. Thankfully, he actually listened when we explained to him why it wouldn't.

  • Bradley (unregistered)

    It's kind of like this bicycle lock: http://3.bp.blogspot.com/-0SfKxPfF8Do/UPwWj9whJaI/AAAAAAABURg/M6wUnK5KsFU/s1600/5.jpg

  • nullptr (nodebb)


  • Da expert (unregistered)


  • Steve_The_Cynic (nodebb) in reply to Bradley

    Well, so long as there's a railing, lamppost, or similar inside the yellow loop, that might actually work to stop someone making off with the front wheel and the handlebars. It doesn't stop someone stealing the saddle and/or the rear wheel and/or the frame, but at least you'll have the handlebars and the front wheel. (Depending on how hard it is to remove the handlebars from the top of the steering column without cutting anything, you might even get to keep the frame.)

    The locking "solution" in the article is even less good than that.

  • Herby (unregistered)

    Sounds to me like the "Lock Ness Monster".

    Sorry, I couldn't resist. You can groan now.

  • codemonkey (unregistered)

    I can never remember how to do this. i always have to go to that stack overflow answer.

    threading is hard

  • siciac (unregistered) in reply to Oliver Jones

    Once they learn how to make monitors work, the next step is always trying to run hundreds of threads doing IO on a single disk, or trying to run 1000 threads that all stack up on a single monitor. :-/

  • cerkiewny (unregistered)

    I have seen similar code, It was introduced to fix some bug. Interestingly it was some sort of stack corruption... And it... did the job!? After a long investigation we found that the useless lock was shifting the values in the stack only to make the bug corrupt some other memory. The bug went away...

    Creating a stack in which 90% of values are only there to be corrupted seems like legit solution to problems. I call the pattern: "meat shield".

  • doubting_poster (unregistered) in reply to cerkiewny


  • abott (unregistered)

    That article was just so much fun to read. I told everyone at the https://legitimate-writing-services.blogspot.com/ site to read this article as well and they all had fun reading this as well.

  • Russelan (unregistered)

    Now here you're talking about the Synchronized Threads which is sound good and unique information for me. I really happy to come here to acknowledge very important points you have shared with us. Any how, I need to know about AussieEssayReviewsCom but at the same time this is sound good and valuable topics to be discussed here.

Leave a comment on “Synchronized Threads”

Log In or post as a guest

Replying to comment #:

« Return to Article