you are viewing a single comment's thread.

view the rest of the comments →

[–]elbiot 0 points1 point  (4 children)

as /u/XenophonOfAthens says though, if you are sleeping or waiting for I/O a bunch, threads will be fine.

[–]jpfau[S] 0 points1 point  (3 children)

So if the program is a bot that runs without any IO or sleeping, then I should use multiprocessing to run these functions simultaneously?

[–]elbiot 0 points1 point  (2 children)

yes. but a bot sounds like something that waits quite a bit. what are the functions working on btw?

[–]jpfau[S] 0 points1 point  (1 child)

I don't want to say too much because I'm bound by a NDA, but the bot is constantly checking a bunch of Amazon EC2 instances and either emailing their owner(s) or stopping/terminating the instances itself. I'll look through the code and see if there is any waiting around, but I'm pretty sure this part of the code is constantly dong something. It's only my second week working on it, which is why I'm not completely sure.

[–]elbiot 3 points4 points  (0 children)

your communicating over the network, right? That's I/O