I the current system, that’s hard. It’s one of the problems that layer-two technologies are working addressing. Smart contracts look like a promising mechanism to address this. In this case, it is setup to look for confirmation entries from both parties further down the chain before the transaction actually happens. It ends up becoming a simultaneous transfer and you close the window on the timing attacks that transactions currently have.
Look harder at the space beyond currencies. I personally think they’re mostly a distraction. There’s a lot going on in other areas that I think will ultimately offer more. To use a car analogy again, we’re in Model-T days still, but that’s going to change quickly.