Question d’entretien chez Wrike

When multiple threads access multiple shared resources, how can you prevent deadlocks between them?