Automatic and objective detection algorithms for gait events from MEMS Inertial Measurement Units data have been developed to overcome subjective inaccuracy in traditional visual observation. Their accuracy and sensitivity have been verified with healthy older adults, Parkinson's disease and spinal injured patients, using single-task gait exercises, where events are precise as the subject is focusing only on walking. Multi-task walking instead simulates a more realistic and challenging scenario where subjects perform secondary cognitive task while walking, so it is a better benchmark. In this paper, we test two algorithms based on shank and foot angular velocity data in single-task, dual-task and multi-task walking. Results show that both algorithms fail when the subject slows extremely down or pauses due to high cognitive and attentional load, and, in particular, the first stride detection error rate of the foot-based algorithm increases. Stride time is accurate with both algorithms regardless of walking types, but the shank-based algorithm leads to an overestimation on the proportion of swing phase in one gait cycle. Increasing the number of cognitive tasks also causes this error with both algorithms.