Java CountDownLatch

What is CountDownLatch? A synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes, i.e., a kind of synchronization tool that allows one Thread¬† to wait for one or more Threads before it starts processing. How does CountDownLatch work? A CountDownLatch is initialized with […]

Read More

BlockingQueue in Java

What is BlockingQueue ? A blocking queue is a queue that blocks when you try to dequeue an empty queue, or if you try to enqueue items in a full queue. A thread trying to dequeue from an empty queue is blocked until some other threads insert an item into the queue. A thread trying […]

Read More