Q. CSAPP 11단원 네트워크 읽는 중 getaddrinfo 함수가 이전에 사용되던 gethostbyname이나 getservbyname에 대해 reentrant하다는 장점을 갖고 있다고 함. Reentrant가 뭔데?
- 정의
reentrant
a function whose effect, when called by two or more threads, is guaranteed to be as if the threads each executed the function one after another in an undefined order, even if the actual execution is interleaved - 결론
둘 이상의 스레드에 의해 호출되었을 때, 호출 순서에 상관없이 (interleave 되어도) 하나가 수행되고 난 다음 다른 함수 호출이 수행된 것처럼 일정한 결과를 반환하는 함수.
'공부 기록 > 자잘한것들' 카테고리의 다른 글
[Mac/Eclipse STS4] SpringToolSuite4 응용 프로그램을 열 수 있는 권한이 없습니다. (0) | 2024.04.25 |
---|---|
Proxy와 Router의 차이 (0) | 2023.09.22 |
Implicit, Explicit 헷갈리는 것 정리 (0) | 2023.09.10 |
재귀, DFS, 백트래킹 (0) | 2023.09.08 |
분할정복 vs DP (0) | 2023.09.06 |