Question about using Stackless with Twisted.
![](https://secure.gravatar.com/avatar/711da0d6dd39d720d94970c41bf3d639.jpg?s=120&d=mm&r=g)
I don't know very much about Twisted, but I would like to know how easy would it be to use twisted with WSGI and use it with Stackless so that I could use Twisted's defereds but wrap them in a way so that upon callback my tasklets resume where they had called the defereds using stackless channels. to make it more clear, it would be something like: def dcall(function, paramaters): dcall2(function, parameters, stackless.channel()) def dcall2(function, parameters, ch): def callback(result): ch.send(result) twisted.add_callback(function, parameters, callback) return ch.receive() # in my html rendering.. # do stuff favorite_color = dcall(async_cursor_execute('select * from favorite_colors where userid=?', userid)["favoritecolor"] # do more stuff know what I mean? thanks in advance.
![](https://secure.gravatar.com/avatar/711da0d6dd39d720d94970c41bf3d639.jpg?s=120&d=mm&r=g)
def dcall(function, paramaters): return dcall2(function, parameters, stackless.channel()) is how the dcall function should have read.
participants (1)
-
inhahe