when I see the conditional variables section of CPP11, I find that all conditional variables are used in conjunction with locks, but at this time they all use unique_lock instead of lock_guard,. Can you explain that?
when I see the conditional variables section of CPP11, I find that all conditional variables are used in conjunction with locks, but at this time they all use unique_lock instead of lock_guard,. Can you explain that?
seems to be because the existence of lock_guard itself is strongly related to mutex, that is to say, once lock_ lock_ exists, the mutex must be locked, while in the condition variable, there is a procedure to release the lock
.Previous: When you use el-menu router to jump to a secondary menu, the whole menu will be refreshed.
Next: Intellij idea imported maven project, reported an error. BindingException