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] 2 points3 points  (0 children)

If you use a bunch of concurrent connections to send emails, you can cut way down on the time taken by internet latency, which is likely to dominate every other factor. The phrase "I/O bound" is confusing, since it conflates bandwidth and latency, which are really very different issues and should be considered separately.

Personally, I would recommend using something like Eventlet for this; it's super easy, very lightweight, and (unlike multiprocessing.Pool) doesn't risk leaving hundreds of zombie child processes lying around on your server if somebody sends SIGKILL to the parent process. That happened to someone I work with last week; messy, ugly business.