Our brain is designed to focus on one task. However, by multitasking we are training it to be distracted by multiple stimuli. Each time we switch tasks we lose our focus. The brain takes some sometime before it can readjust to the new task. On an average it takes 23 minutes before the brain can refocus. This is a major barrier to reaching a state of flow while performing a task.
One way to combat this is to batch tasks so that your brain can work on one aspect long enough to generate new ideas, figure out solutions etc. It gives a chance for your brain to think and work deeply in a given area. Elon Musk is said to batch his tasks in a day.