정규표현식을 사용할 때 regex_t 가 thread safe 한가요?
글쓴이: trymp / 작성시간: 화, 2015/10/20 - 9:45오후
Main thread regex_t preg; regcomp(&preg, exp_str, REG_EXTENDED | REG_NEWLINE); Sub threadA regexec(&preg, match_str1, 0, NULL, 0); Sub threadB regexec(&preg, match_str2, 0, NULL, 0);
위와 같이 Main thread 에서 regex_t handler 를 미리 컴파일해 놓고
sub thread A와 B 가 같이 사용할 때,
side effect 가 생기거나 버그가 생길 확률은 없나요?
regex_t 를 공유해서 쓸 때 thread safe 상 문제가 없는지 궁금합니다.
고수님들의 조언 부탁드립니다.
Forums:
int regexec(const regex_t
int regexec(const regex_t *preg, const char *string,, ...)
감사요.. 제가 꼼꼼히 보지 못했네요..
^^
댓글 달기