use master thread to merge graphs, reducing contention