Asynchronous call into a Synchronous call in Python
Question: In essence I am going to make a call to a remote XMLRPC server and it will
process the request asynchronously.

    
    
    import xmlrpclib
    
    client = xmlrpclib.ServerProxy('http://localhost:8080')
    
    client.add(3,5)
    
    
    def add_result(result):
        print result
    

I know at some point in the future that add_result will get called with the
result. The thing is. I want to be able to turn the call client.add into a
blocking call that will return the result. I'm doing this for a GUI that will
be calling on me. The question is where should I be looking to read about this
sort of solution? I'm not really sure where to start.

I don't think I've explained myself well at all. The server I am calling is
implementing the aynchronous part. When I call add it will return true. And I
know that the server is expecting me to implement add_result which is what it
will call on me. What I am trying to do is clean this crazy scheme up so that
someone can call add on me and I will block until add_result is called on me,
I will then return to whoever called me. I hope this clears things up


Answer: Your claim is nonsense. xmlrpclib operations are synchronous and blocking. For
performing asynchrous operations etc. you need to implement something using
threads.

