Another way to integrate Twisted with Stackless python, is to use multiple threads. One thread handles Twisted’s reactor while Stackless tasklets run in at least one other thread. This lowers the deterministic nature of Stackless, but for certain conditions may be more effective than trying to integrate Twisted and Stackless into a single thread. Communication between the threads is handled through a channel, which according to the documentation for Stackless python is thread-safe.
Sometimes, you come across two programming toolkits that would go great together. However, in the case of Twisted Matrix and Stackless python, there’s some legwork required to get these two great systems to work together.