Merging event loop with Queue