We know that escrow mechanisms are easy to implement when it involves a trusted 3rd party. For example if A and B don't trust each other they can simply send their goods to C whom they both trust. Then C can distribute the goods to them fairly.
However, is there a primitive that achieves the same when there isn't a trusted 3rd party? Basically, A and B don't trust each other and they want to exchange something. Can they do this without involving any trusted party?