3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

thread_pause()

정의

thread_pause(th_id)

기능

Thread를 일시 정지합니다.

인수

인수명

자료형

기본값

설명

th_id

int

-

일시 정지하고자 하는 thread ID

리턴

설명

0

성공

음수값

실패

예외

예외

설명

DR_Error (DR_ERROR_TYPE)

인수들의 데이터형 오류 시

DR_Error (DR_ERROR_VALUE)

인수의 값이 유효하지 않을 시

DR_Error (DR_ERROR_RUNTIME)

C Extension 모듈 에러 발생 시

DR_Error (DR_ERROR_STOP)

프로그램 강제 종료 시

예제

Python
def fn_th_func():
  if check_motion()==0: # 수행 중인 모션이 없는 경우
    set_digital_output(1, OFF)
  else:
    set_digital_output(1, ON)
#----- 메인 루틴 --------------------------------------
th_id = thread_run(fn_th_func, loop=True)

# do something…

thread_pause(th_id) #쓰레드 일시 정지

Keyword

thread / thread_