def terminate_thread(thread_ident, exc_type=exceptions.ThreadTimeoutException):

    ctypes.pythonapi.PyThreadState_SetAsyncExc(
        ctypes.c_long(thread_ident), ctypes.py_object(exc_type))
Terminate a python thread.
dataset/ETHPy150Open openstack/rally/rally/common/utils.py/terminate_thread