Global data multithread (slow version)