Top "Synchronization" questions

Synchronization refers to using controls to maintain a coherent representation, either a group of processes running the same program (process synchronization), or representations of data (data synchronization).

Collections.synchronizedList and synchronized

List<String> list = Collections.synchronizedList(new ArrayList<String>()); synchronized (list) { list.add("message"); } Is the block "…

java collections synchronization
Waiting on multiple threads to complete in Java

During the course of my program execution, a number of threads are started. The amount of threads varies depending on …

java multithreading synchronization
How do determine if an object is locked (synchronized) so not to block in Java?

I have a process A that contains a table in memory with a set of records (recordA, recordB, etc...) Now, …

java synchronization
Is it possible to use mutex in multiprocessing case on Linux/UNIX ?

This is an interview question. Is it possible to use mutex in multiprocessing case on Linux/UNIX ? My idea: No, …

multithreading synchronization mutex multiprocessing semaphore
REST web services: synchronous or asynchrous?

What is the default behavior of REST web services - synchronous or asynchronous? If it's synchronous then can we create …

java rest web-services asynchronous synchronization
Ensure that Spring Quartz job execution doesn't overlap

I have a Java program that executes from Spring Qquartz every 20 seconds. Sometimes it takes just few seconds to execute, …

java spring synchronization quartz-scheduler
What is progress and bounded waiting in critical section?

I was reading Critical Section Problem from Operating System Concepts by Peter B. Galvin. According to it 1) Progress is : If …

operating-system synchronization critical-section data-synchronization thread-synchronization
Are Java static initializers thread safe?

I'm using a static code block to initialize some controllers in a registry I have. My question is therefore, can …

java multithreading static synchronization static-initializer
How to wait for all goroutines to finish without using time.Sleep?

This code selects all xml files in the same folder, as the invoked executable and asynchronously applies processing to each …

go synchronization goroutine
Synchronizing on String objects in Java

I have a webapp that I am in the middle of doing some load/performance testing on, particularily on a …

java multithreading synchronization thread-safety synchronized