Cherrypy_handling requests
问题 I've been searching for a while now but can't find an answere. I know that cherrypy creates a new thread for handling requests (GET, PUT, POST, DELETE etc). Now i fetch the parameters like this: ... @cherrypy.tools.json_in() @cherrypy.tools.json_out() def POST(self): Forum.lock_post.acquire() conn = self.io.psqlConnect(self.dict_psql) cur = conn.cursor(cursor_factory = psycopg2.extras.RealDictCursor) params = cherrypy.request.json ... return some_dict As you can see im locking the thread to