Use rwlock rather than mutex for protecting THD_list
modifications (insert/erase) are protected by write lock iteration over list is protected by read lock. This way, threads that iterate over the list (as in SHOW PROCESSLIST, SHOW GLOBAL STATUS) do not block each other.
Showing
Please register or sign in to comment