Truck died .......Restarted immediately on 2000 Mazda B2500

My truck died as I wasa driving down the road. I waas able to pull to the side. Throw it in gear - standard- and re-start it and it drove fine, but I am worried it will happen again....this time on a highway ! ....Any ideas ?

Asked by for the 2000 Mazda B2500