def _get_state_event(self, state):
        """Return a win32event for the given state (creating it if needed)."""
        try:
            return self.events[state]
        except KeyError:
            event = win32event.CreateEvent(
                None,
                0,
                0,
                'WSPBus %s Event (pid=%r)' % (state.name, os.getpid()),
            )
            self.events[state] = event
            return event
Return a win32event for the given state (creating it if needed).
cherrypy/process/win32.py