This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author polymorphm
Recipients berker.peksag, demian.brecht, flox, loewis, mcjeff, polymorphm
Date 2014-12-16.09:56:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1418723815.57.0.225987055115.issue14134@psf.upfronthosting.co.za>
In-reply-to
Content
@demian.brecht , for high probably to catch *infinite_freeze* (at GNU/Linux) -- if we may will run requests of "xmlrpc.client.ServerProxy" -- parallely:


(when running next code -- need to make some network-disconnections on "network-router-computer")



    #!/usr/bin/env python3

    import threading
    from xmlrpc.client import ServerProxy

    ITERATION_COUNT = 100
    THREAD_COUNT = 100

    def thread_func(thread_name):
        for i in range(ITERATION_COUNT):
            try:
                server = ServerProxy("http://betty.userland.com")
                rpc_result = server.examples.getStateName(41)
                print('{}/iter_{} {!r}'.format(thread_name, i, rpc_result))
            except Exception as e:
                print('{}/iter_{} error: {} {}'.format(thread_name, i, type(e), str(e)))

    def main():
        print('***** testing begin *****')
        
        thread_list = []
        
        for i in range(THREAD_COUNT):
            thread_name = 'thread_{}'.format(i)
            thread_list.append(threading.Thread(target=thread_func, args=(thread_name,)))
        
        for thr in thread_list:
            thr.start()
        
        for thr in thread_list:
            thr.join()
        
        print('***** testing end *****')

    if __name__ == '__main__':
        main()
History
Date User Action Args
2014-12-16 09:56:55polymorphmsetrecipients: + polymorphm, loewis, flox, mcjeff, berker.peksag, demian.brecht
2014-12-16 09:56:55polymorphmsetmessageid: <1418723815.57.0.225987055115.issue14134@psf.upfronthosting.co.za>
2014-12-16 09:56:55polymorphmlinkissue14134 messages
2014-12-16 09:56:55polymorphmcreate