9 Apr
2014
9 Apr
'14
9:43 a.m.
did shared_lock has a member like visual c++ critical_section's owner? i use shared_lock in a game server, it has several hundred threads. if has owner, it more easy resolve deadlock.
I guess you mean shared_mutex. No, it doesn't propagate such an information to its interface. (If your server is network-oriented, it's worth re-designing it to take an advantage of the Proactor pattern (using Boost.Asio) -- this way you'll get rid of most of these hundreds of threads, and most of those (unnecessary) multithreading issues will disappear.)