Skip to main content
Skip table of contents

thread_resume(th_id)

Features

This function resumes a temporarily suspended thread.

Parameters

Parameter NameData TypeDefault ValueDescription

th_id

int

-

Suspended thread ID to be resumed

Return

ValueDescription

0

Success

Negative value

Failed

Exception

ExceptionDescription

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

DR_Error (DR_ERROR_RUNTIME)

C extension module error occurred

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

PY
def fn_th_func():
	if check_motion()==0:	# No motion in action
		set_digital_output(1, OFF)
	else:
		set_digital_output(1, ON)

#----- Main routine --------------------------------------
th_id = thread_run(fn_th_func, loop=True)

# do something…
thread_pause(th_id) # Suspends the thread.

# do something…
thread_resume(th_id) # Resumes the suspended thread.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.