Add multithread support for Metadata.