일단 운영체제나 스레드 라이브러리에서 제공해주는 것이 처음에 c로 설계되었기 때문입니다.
c++로 설계 할수는 있지만 그건 방법의 문제입니다. 얼마든지 c++형태로 설계를 직접 할수 있습니다. 자바가 그렇지요.
c형태로 설계되었다는 말은 c와 호환이 된다는 의미입니다.
따라서 전역함수 또는 static함수만이 c와 호환이 가능하므로 이것들 만이 가능합니다.
-------------------------------------------------------------------------------
It's better to appear stupid and ask question than to be silent and remain stupid.
-------------------------------------------------------------------------------
It's better to appear stupid and ask question than to be silent and remain stupid.
일단 운영체제나
일단 운영체제나 스레드 라이브러리에서 제공해주는 것이 처음에 c로 설계되었기 때문입니다.
c++로 설계 할수는 있지만 그건 방법의 문제입니다. 얼마든지 c++형태로 설계를 직접 할수 있습니다. 자바가 그렇지요.
c형태로 설계되었다는 말은 c와 호환이 된다는 의미입니다.
따라서 전역함수 또는 static함수만이 c와 호환이 가능하므로 이것들 만이 가능합니다.
-------------------------------------------------------------------------------
It's better to appear stupid and ask question than to be silent and remain stupid.
-------------------------------------------------------------------------------
It's better to appear stupid and ask question than to be silent and remain stupid.
C++의 non-static member
C++의 non-static member function의 첫번째 인자는 implicit하게 this pointer가 넘어갑니다.
그래서 C interface로 제공되는 쓰레드 생성 함수에서 요구하는 thread function의 인자의 갯수가 맞지 않지요.
static member function은 implicit하게 this가 넘어가지 않습니다.
Life rushes on, we are distracted
Life rushes on, we are distracted
댓글 달기