I am using cherrypy
in python script.I think I have to register a callback method from the main application so that i can stop cherrypy main process from a worker thread,but how do i kill the main process within the that process.
So i want to know how to stop cherrypy
from within the main process.
Try this.
import sys
class CherryPyApp(object):
def default(self):
sys.exit()
default.exposed = True
cherrypy.quickstart(CherryPyApp())