Questions tagged [concurrency]
In computer science, concurrency is a property of systems in which multiple computations can be performed in overlapping time periods. The computations may be executing on multiple cores in the same chip, preemptively time-shared threads on the same processor, or executed on physically separated processors.
464 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
25
views
ReadWrite Lock compatible with coroutines
A while ago I wrote for my own needs a (non-reentrant) read-write lock for kotlin's coroutines. I got no reactions on the relevant github thread. I think it's a nice code, so I thought I'd share it ...
4
votes
3
answers
657
views
Multithreaded array summation in Java - best practice, structure, acceptable use of Constant classes. There is no concurrency?
The task is educational. The basic functionality is working. Here are some questions for my code. Please give me feedback.
Main:
Architecture & Design: Is the decomposition appropriate? Should ...
1
vote
1
answer
53
views
Generate Serial number based on column value in sql server
I have table called cash_voucher it has some columns.
I want to generate voucher number based location id.
I mean generates voucher numbers starting from 1 for each location
For example location id is ...
1
vote
0
answers
51
views
Lock free Leaky Bucket Rate Limiter
I want to validate my solution for a lock-free leaky bucket rate limiter. Given a queuing capacity and rate limit per second, it should queue requests till capacity is reached and it should allow only ...
1
vote
2
answers
154
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 ...
5
votes
1
answer
96
views
Find food related words in German: Seeking Feedback on Concurrency and Code Organization
I'm developing a pipeline that processes unknown ingredient data from the OpenFoodFacts API. The goal is to find valid German words that are not yet in their taxonomy.
The tool performs the following ...
2
votes
1
answer
86
views
Multithreaded Merge Sort Using ForkJoin Framework
I've implemented a multithreaded merge sort using Java's ForkJoin framework, and I wanted to gather feedback on its correctness, efficiency, and scalability.
Here's my implementation:
...
4
votes
1
answer
100
views
Go Program for Concurrent FHIR Resource Uploads – Does it Achieve True Concurrent Requests?
I’ve developed a Go program to benchmark a FHIR server by uploading a dataset of FHIR resources concurrently.
The goal is to stress-test the server by sending a specified number (...
8
votes
2
answers
315
views
Multi-producer, multi-consumer blocking queue
Introduction
This is a queue that allows many producers to simultaneously write their items and many consumers to simultaneously read theirs. It's useful when construction and/or consumption could be ...
5
votes
2
answers
659
views
Thread-safe write-efficient register() method for a Load balancer
The code below was written for an interview question of designing a load balancer with only a register() method.
...
3
votes
1
answer
144
views
Amount Transfer Between Different Accounts - Improved Version
This is an improved code version for Amount Transfer Between Different Accounts
Welcoming any further improvements for this.
...
4
votes
1
answer
242
views
Amount Transfer Between Different Accounts
I implemented the below classes for transfer amount between different accounts. Used ConcurrentHashMap and Stamped Lock to handle concurrency.
Am I missing any important concepts here? Are there any ...
5
votes
2
answers
917
views
Reduce String Length With Thread Safety & Concurrency
I implemented the below URL Shortener class. Used ConcurrentHashMap to handle concurrency.
Short URL building logic may not be optimal, but it ensures that only ...
4
votes
2
answers
484
views
Implement service registry servers with load balancing strategies
Have Implemented below service registry class with 2 load balancing strategies.Used Strategy Pattern. Used Stamped lock ( Optimistic write locking) for ensuring thread safety and concurrency. Used ...
3
votes
2
answers
207
views
Data pipeline that handles errors and cancellations
I have code that concurrently reads data from a stream, processes elements, and writes the data to another stream. Each of these individual operations may fail, in which case I want processing to halt ...