Acquire lock to update metrics dict and when making the deepcopy.

Bump version