강의

멘토링

커뮤니티

Inflearn Community Q&A

cx79130796's profile image
cx79130796

asked

Following and Learning C++ with Hong Jeong-mo

19.6 Multithreading Example (Vector Dot Product)

스레드를 강제 종료시키려고 할려면 어떻게?

Resolved

Written on

·

1K

0

스레드를 강제 종료시키는 인터럽트는 어떻게 구현을 하는지요? (std:thread, future, std::transform_reduce 사용시)

C++

Answer 1

0

honglab님의 프로필 이미지
honglab
Instructor

아직까지 제가 스레드를 강제종료시키는 알고리즘을 구현해본적이 없어서 잘 모르겠네요. 굳이 구현한다면 메시지 주고 받는 식으로 구현을 할텐데 관련 API가 표준으로 들어왔는지는 모르겠습니다.

검색해보니 std::terminate()가 있다고 하네요. 

https://stackoverflow.com/questions/12207684/how-do-i-terminate-a-thread-in-c11

cx79130796's profile image
cx79130796

asked

Ask a question