Kill thread does not stop the movement

Hi,
I see that the robot arm keeps moving through the kill thread command is issued. Is it required to provide the stopj command as well to stop the movement? Below is the test script I’ve used. Thanks.

`

def thread_prog():
set_tool_communication(False, 115200, 0, 1, 1.5, 3.5)
set_tool_output_mode(0)
set_tool_digital_output_mode(0, 1)
set_tool_digital_output_mode(1, 1)
set_tool_voltage(0)
step_count_9abcdbf1_b410_4fc8_8eb9_04aeae05d209 = 0.0
thread Step_Counter_Thread_362bf5fc_c431_477a_b9af_1976601a499d():
while (True):
step_count_9abcdbf1_b410_4fc8_8eb9_04aeae05d209 = step_count_9abcdbf1_b410_4fc8_8eb9_04aeae05d209 + 1.0
sync()
end
end
thrd = run Step_Counter_Thread_362bf5fc_c431_477a_b9af_1976601a499d()
set_safety_mode_transition_hardness(1)
set_tcp(p[0.0,0.0,0.0,0.0,0.0,0.0])
set_payload(1.0)
set_gravity([0.0, 0.0, 9.82])
set_standard_analog_input_domain(0, 1)
set_standard_analog_input_domain(1, 1)
set_tool_analog_input_domain(0, 1)
set_tool_analog_input_domain(1, 1)
set_analog_outputdomain(0, 0)
set_analog_outputdomain(1, 0)
set_input_actions_to_default()
$ 3 “Thread_1”
thread Thread_1():
while (True):
$ 4 “speedj([0.2,0.3,0.1,0.05,0,0], 0.5, 0.5)”
speedj([0.2,0.3,0.1,0.05,0,0], 0.5, 0.5)
end
end
global threadId_Thread_1 = run Thread_1()
while (True):
$ 1 “Robot Program”
$ 2 “‘runnign in thread’”
# ‘runnign in thread’
end
kill threadId_Thread_1
end`