[DF-1548] fix thread synchronization.