example and docs explaining deadlocks and transactions