• (nodebb)

    With so many threads being spun off, the shirt will soon fall apart.

  • MaxiTB (unregistered)

    I'm confused, doesn't python have proper libraries to parallelize tasks?

  • Charles Shapiro (unregistered)

    I'm not very comfortable with multi-threading. But isn't this a thing that yield is designed to help?

  • Tim (unregistered) in reply to MaxiTB

    I'm sure it does, but the problem here is almost certainly that the person writing the code didn't think about the requirement and just piled in, initially writing some simple code that didn't work, gradually augmenting it using the Darwinian process until it worked well enough to pass a few test cases. This is a pretty standard design methodology for multi-threaded code as far as I can see.

  • Sauron (unregistered)

    The purpose of generating an infinite number of threads is obvious: twisting them as strands, themselves to be twisted as a rope, itself to be knotted as a noose. Those thread are the symbol of despair! Avoid them, lest your sanity gets sacrificed to Codethulhu!

  • (nodebb)

    Even without threading this code doesn't make any sense.

  • gfxsacreation (unregistered)
    Comment held for moderation.
  • thanks (unregistered)
    Comment held for moderation.
  • Gearhead (unregistered) in reply to Tim

    @Tim I agree with your theory -- programmer is inexperienced or uncurious and does a random walk through the code space. It is possible to do lock-free handshaking, and there is a place for it. But (a) compilers can reorder instructions, (b) processors can perform out-of-order execution, and (c) lock-free code is harder to get right, so needs more planning and documentation.

  • Jeremy (unregistered)
    Comment held for moderation.

Leave a comment on “Background Threads”

Log In or post as a guest

Replying to comment #:

« Return to Article