merge the two event loops