temporary fix to avoid concurrency problems when accessing the data_

this should avoid concurrency problems when accessing the std::set both in reading and writing. to be considered a temporary solution since it is sub-optimal.