You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor fixes - shared_lock, std::ref param to thread (#9)
* creating threads
use the apt function
* std::ref can't work on const rvalue
use of deleted function ‘void std::ref(const _Tp&&) [with _Tp = int]’
invalid initialization of non-const reference of type ‘int&’ from an rvalue of type ‘int’
* shared_lock uses shared_mutex
**Because the thread functions can't return anything, passing by reference is the only way to properly get data out of a thread without using global variables.** Ensure that your thread modifies the data passed in by reference and you should be good to go.
@@ -480,7 +481,8 @@ A shared lock is just like a unique lock, except the lock is a shared lock as op
0 commit comments