That requires a trusted thrid party.
It requires a trusted third party
if you want the relationship between the two transactions to be secret. If all you're concerned about is "A gets B's litecoins, B gets A's bitcoins", then the only failure mode, even with a dishonest C, is that the trade doesn't go through, you've wasted a little time but not lost any money, and you find a new C.
Heck, you don't even
need a separate person to be C; A or B can fill that role without any loss of atomicity (although, again, it means that A and B know who each other are).