Use separate locks for separate member variables in lib