About 2,060,000 results
Open links in new tab
  1. java - What does 'synchronized' mean? - Stack Overflow

    Jul 6, 2009 · I have some questions regarding the usage and significance of the synchronized keyword. What is the significance of the synchronized keyword? When should methods be synchronized? …

  2. How does synchronized work in Java - Stack Overflow

    34 In Java, each Object provides the ability for a Thread to synchronize, or lock, on it. When a method is synchronized, the method uses its object instance as the lock. In your example, the methods bow …

  3. How Synchronization works in Java? - Stack Overflow

    Jun 25, 2012 · I have a doubt regarding Java Synchronization . I want to know if I have three Synchronized methods in my class and a thread acquires lock in one synchronized method other two …

  4. synchronization - How to synchronize or lock upon variables in Java ...

    How to synchronize or lock upon variables in Java? Asked 14 years, 7 months ago Modified 6 years, 7 months ago Viewed 178k times

  5. Java Singleton and Synchronization - Stack Overflow

    Jun 23, 2012 · Please clarify my queries regarding Singleton and Multithreading: What is the best way to implement Singleton in Java, in a multithreaded environment? What happens when multiple threads …

  6. Java synchronized method lock on object, or method?

    In Java synchronization,if a thread want to enter into synchronized method/block, it will acquire the lock on: all synchronized non-static methods of this object

  7. Performance of synchronize section in Java - Stack Overflow

    Apr 6, 2017 · I had a small dispute over performance of synchronized block in Java. This is a theoretical question, which does not affect real life application. Consider single-thread application, which uses ...

  8. java - Synchronization vs Lock - Stack Overflow

    java.util.concurrent API provides a class called as Lock, which would basically serialize the control in order to access the critical resource. It gives method such as park() and unpark(). We ca...

  9. Avoid synchronized (this) in Java? - Stack Overflow

    Whenever a question pops up on SO about Java synchronization, some people are very eager to point out that synchronized (this) should be avoided. Instead, they claim, a lock on a private reference i...

  10. What is the use of static synchronized method in java?

    Nov 3, 2023 · Nowadays, Java has more powerful concurrency features, in java.util.concurrent and its subpackages, but the core Java 1.0 constructs such as synchronized methods are still valid and usable.