execute gathering in multi thread