Added writer.wait_merging_threads
call
#628
Merged
writer.wait_merging_threads
call
#628