2009/8/29 <[email protected]>: > Thanks for the suggestions ! > > I tried the stacklesssocket solution using the below code, with a > 'wait-service': this service waits 10 seconds and then returns RESULT. > > ==== > from concurrence import Tasklet, dispatch > import xmlrpclib, stacklesssocket > > stacklesssocket.install() > > def xml_rpc_call(): > connection = xmlrpclib.ServerProxy('http://127.0.0.1:8888/') > print connection.test_service.wait() > > def dots(): > while True: > print "." > Tasklet.sleep(1) > > def main(): > Tasklet.new(xml_rpc_call)() > Tasklet.new(dots)() > > > dispatch(main) > ==== > > There is an odd thing about this: when I remove stacklesssocket.install(), > the output is: > RESULT > . > . > and so on. With the stacklesssocket.install(), the output is: > . > RESULT > . > and so on. The stacklesssocket seems to be nonblocking, as the dots tasklet > can print the dot once. The dots tasklet does a sleep and then the xml-rpc > tasklet is in control, this time however, it blocks... > > Anybody an idea about what's wrong ?
You might be best to ask on the Concurrence mailing list. I have no idea what that does for sockets and how combining it with Stackless and the replacement socket module would do. Richard. _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
