Home > Back-end >  With STD: : thread created thread can try pthread read-write lock
With STD: : thread created thread can try pthread read-write lock

Time:02-25


With STD: : thread created thread can try pthread read-write lock,

Because the current use of c + + standard does not support read-write lock

CodePudding user response:

Should be using STD standard lock to realize the read-write lock yourself,

CodePudding user response:

reference 1st floor taodm response:
should be using STD standard lock to realize the read-write lock yourself,
thank you, I will use this way, but I still wonder can not inconsistent with the pthread interface combination, I think of in & lt; C + + concurrent programming practice & gt; The author USES the boost library read-write lock, so should be able to mix?

CodePudding user response:

Should be able to mix, STD: : thread on Linux implementation is dependent on the pthread library

CodePudding user response:

People may not focus on code portability, completely
refer to the second floor qq_40162781 response:
Quote: refer to 1st floor taodm response:
should be using STD standard lock to realize the read-write lock yourself,
thank you, I will use this way, but I still wonder can not inconsistent with the pthread interface combination, I think of in & lt; C + + concurrent programming practice & gt; The author USES the boost library read-write lock, so should be able to mix?
  • Related