Modified mt_bfs so that the frontier edge q is locked by a spin lock, eliminating costly sleeping time.