ability to switch between dispatch and executing code on io thread