Skip to main content
The 2024 Developer Survey results are live! See the results

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.

0 votes
1 answer
25 views

Recursive use of ProcessPoolExecutor is Hanging

Problem I'm trying to use a ProcessPoolExecutor with recursive calls, but it doesn't work. I created a minimal example below from concurrent.futures import ProcessPoolExecutor from time import sleep ...
-2 votes
0 answers
50 views

How to process a (near) infinite list in Java?

I am using an object storage provider that does not implement a recursive delete. When someone comes in and asks to delete a bucket, I have to manually empty the bucket. I basically have two methods ...
1 vote
1 answer
88 views

Java concurrency problem by multi-thread not occured and automatically synchronized

I’m trying to test a multi-threaded concurrency problem. What I expected is that the result should be less than 0 (not always but sometimes), because it is not synchronized. Notice the pair of println ...
0 votes
0 answers
11 views

Concurrency Control Mechanism For Dataframe Processing In Django WebApp

I have django webapp where processing data directly on pandas dataframe without using django model. now, i want to make this operations concurrency control for multiple processing requests ...
1 vote
0 answers
10 views

Concurrent Requests Creating Duplications for Users

I am facing an issue with concurrent requests resulting in duplicate entries. Our system checks whether a user exists and creates a new one if not, using middleware. However, when multiple concurrent ...
3 votes
4 answers
1k views

Swift async let Task throws Cancellation Exception if not Awaited

I am new to Swift Concurrency and trying to understand Task -> ChildTask relationship. I created here two Tasks Parent Task : (1)Calls the test() method in Actor from MainThread. (3.2)The Actor ...
0 votes
0 answers
25 views

Problem with concurrency while updating data in DB using Quartz .NET and EF Core

I want to introduce horizontal scaling instead of vertical in my app. Now we are using Quartz .NET for background tasks, but in non-clustered mode, just 1 instance. So I found ability to do horizontal ...
0 votes
0 answers
22 views

Why is a Thread-Scoped Bean Injected Instead of a Default-Scoped Bean in Spring Boot?

I recently made a change to my Spring Boot project. I initially had a bean without a specific scope. Due to an implementation that uses threads and the occurrence of concurrency issues, I needed to ...
4 votes
3 answers
2k views

How to add a timeout to an awaiting function call

What's the best way to add a timeout to an awaiting function? Example: /// lets pretend this is in a library that I'm using and I can't mess with the guts of this thing func fetchSomething() async -&...
1 vote
0 answers
12 views

Modifying object outside RxJava stream

Is it correct to modify object inside reactive flow, when it was defined outside of it? Example: public Single<MyDto> createDto() { MyDto dto = new MyDto(); return Single.just(“...
1 vote
1 answer
100 views

Why is the go compiler flagging my variable as unused?

my first question in StackOverflow :D I am running on go 1.16. I created this function: func (_m *MyPool) InChannel(outs ...chan interface{}) error { for _, out := range outs { out = _m....
11 votes
5 answers
3k views

ExecutorService: how to prevent thread starvation when synchronization barriers are done in the threads

I have a situation for which I am having troubles to find a clean solution. I'll try to explain as detailed as possible. I have a tree-like structure: NODE A NODE A.1 NODE A.2 NODE A....
0 votes
1 answer
44 views

Can CUDA Thrust Kernels operate in parallel on multiple streams?

I am attempting to launch thrust::fill on two different device vectors in parallel on different CUDA streams. However, when I look at the kernel launches in NSight Systems, they appear to be ...
-1 votes
0 answers
18 views

Keycloak concurrency issue while updating roles of a user after authentication with external server

I'm facing an issue with Keycloak while using an external user storage provider. The problem occurs when the same user tries to log in concurrently on multiple devices. Here are the details: Scenario: ...
5 votes
2 answers
2k views

Why concurrent queue with sync act like serial queue?

Could anyone help me to understand this code I created: let cq = DispatchQueue(label: "downloadQueue", attributes: .concurrent) cq.sync { for i in 0..<10 { sleep(2) print(i) } } ...

15 30 50 per page
1
2 3 4 5
1555