merge reactor thread and writer thread