2 ms·
the difference is that twisted uses trampolining - there's a top level scheduler that manages everything. if twisted worked exactly as described in this articl
by andrewcooke 15y ago
the difference is that twisted uses trampolining - there's a top level scheduler that manages everything. if twisted worked exactly as described in this article then you'd run out of stack space (python doesn't eliminate tail calls) (also, of course, the trampoline allows other work to happen while processes yield, which is what makes twisted useful).
from another pov: this article describes how the designers of twisted want you to think (ie continuation passing style), but the actual implementation is slightly different.
http://en.wikipedia.org/wiki/Trampoline_(computing)#High_Level_Programming http://en.wikipedia.org/wiki/Trampoline_(computing)#High_Lev...
http://en.wikipedia.org/wiki/Continuation-passing_style http://en.wikipedia.org/wiki/Continuation-passing_style