register a handler (add a callback function)

def handle(self, handler):
        """ register a handler (add a callback function) """
        with self._hlock:
            self._handler_list.append(handler)
        return self