How do I add two integers together with Twisted?

OK, to be clear.

Twisted doesn’t do anything about cpu bound tasks and for good reason. there’s no way to make a compute bound job go any quicker by reordering subtasks; the only thing you could possibly do is add more compute resources; and even that wouldn’t work out in python because of a subtlety of its implementation.

Twisted offers special semantics and event loop handling in case the program would become “stuck” waiting for something outside if its control; most normally a process running on another machine and communicating with your twisted process over a network connection. Since you would be waiting anyways, twisted gives you a mechanism to get more things done in the meantime. That is to say, twisted provides concurrency for I/O Bound tasks

tl;dr: twisted is for network code. Everything else is just normal python.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)