[DF-1548] fix thread synchronization.
[DF-1548] fix thread synchronization.