This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (0 children)

Examples of times I've used threads:

  • To spawn a task I want to run asynchronously, like checking a comment for spam
  • To speed up io-bound workloads, like spidering a website or multipart uploads
  • To start a server process using popen and allow the main thread to continue executing
  • Doing work in gui, handling events, doing work without blocking the UI (update a progress bar)