Is there an escrow-like mechanism that doesn't involve a trusted 3rd party? 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?
There's "Decred cross-chain atomic swapping". It allows two people to exchange cryptocurrencies (currently BTC/LTC/Vertcoin/Decred) without trusting on a third party nor each other.

UPDATE: There's also Lightning Network atomic swap.

You can read about it on Decred blog or Github