DataArt Interview Question

What are the ways to synchronize access from multiple threads.