supports thread/task termination