Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
2 answers
133 views

ProducerConsumerSimulation.java: practicing concurrent programming in Java

Intro This time, I was in the mood for concurrent programing (ProducerConsumerSimulation.java). To this end, I have ended up with the code below. My primary concerns are: Class design is trash, The ...
coderodde's user avatar
  • 31k
2 votes
2 answers
524 views

Write deduplicated 9-digit numbers from concurrent clients to a log

Problem Statement: Write a server (“Application”) in Java that opens a socket and restricts input to at most 5 concurrent clients. Clients will connect to the Application and write any number of 9 ...
ProgrammingHandyman's user avatar
1 vote
1 answer
1k views

Concurrent Queue with enqueue and dequeue using Stack as underlying data structure

This is a mix of data structure and multi threading concept based question. (This is only for understanding and learning purpose) The language for the solution : Java A Queue with FIFO behavior needs ...
Krishna Kumar's user avatar
1 vote
0 answers
943 views

Socket server with consumer-producer design to handle concurrent connections

The usual way is to implement socket server to handle concurrent requests by creating new thread for each request. Instead of this approach i tried to create a server using ...
benjamin c's user avatar
5 votes
2 answers
730 views

Pausing and resuming a concurrent database update queue

I have a class DatabaseQueue which asynchronously runs SQLite updates that it takes from a LinkedBlockingQueue. I implemented a ...
kmecpp's user avatar
  • 153
1 vote
1 answer
750 views

Find pairs of consecutive numbers fetched from blocking queues

I was coding for the following programming question: Suppose you have two independent blocking queues that will keep getting new data, the new data will always be greater than the last element of ...
zokland's user avatar
  • 95
3 votes
1 answer
197 views

Receptive map queue

I've written a class I call ReceptiveMapQueue. Its purpose is to organize the internal structure of an AFKable RPG. It only has two public methods - dumping entries ...
corsiKa's user avatar
  • 660
-2 votes
2 answers
693 views

Simple Implementation of a BlockingQueue

An implementation of BlockingQueue ...
Thomas Mathew's user avatar