LeetCode
Question
·
Jul 2021
Write a custom lock without using synchronization key word.
3 upvotes
4,136 views
4 replies
Question Details
For Microsoft interview, I am asked to write a custome lock. I have implemented the following. public class Lock { boolean isLoked = false; public synchronize void lock() { while (isLoked) { this.wait(); } isLoked =...
Full Details
🔒
Unlock full leaked content
Full insider details, leaked discussions, and candidate experiences.
Get Premium →Topics
Concurrency