I thought I should post this since my exercise biology class just went over it in detail. The professor mentioned that eating a small snack before a workout is fine. However, he stated that, if you are competing and will be working at your maximal workload for a period of time, your last meal or intake of sustenance should be 3-4 hours before the event. If you eat closer to the race, you risk getting hypoglycemia (glucose < 50mg/dl). This is because you increase your insulin to decrease blood glucose levels from the snack. However, when you begin exertion at high levels, your body increases the number of insulin-independent glucose transporters in your cell membranes. The result of this is an insurge of glucose into the skeletal muscle, leaving very little in the bloodstream. This "suck" of glucose can happen in 15min of exercise and will result in severe decrease in performance and cognitive function and likely loss of consciousness. However, eating during exercise (small, comfortable amounts) will not cause any such insulin response (due to exercise induced insulin insensitivity). Therefore, if you plan on running a half marathon/marathon or doing any other event for time, eat 3-4h beforehand and don't eat again until the event starts.