Python XMLRPC with concurrent requests

后端 未结 3 1750
余生分开走
余生分开走 2021-01-05 07:20

I\'m looking for a way to prevent multiple hosts from issuing simultaneous commands to a Python XMLRPC listener. The listener is responsible for running scripts to perform t

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-05 08:13

    There are several choices:

    1. Use single-process-single-thread server like SimpleXMLRPCServer to process requests subsequently.
    2. Use threading.Lock() in threaded server.
    3. You some external locking mechanism (like lockfile module or GET_LOCK() function in mysql) in multiprocess server.

提交回复
热议问题