synchronization between difftree's producer/consumer to finish prod. thread if the iterator was not fully consumed