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.

5,195 questions with no upvoted or accepted answers
13 votes
1 answer
3k views

Best strategy to upload files with unknown size to S3

I have a server-side application that runs through a large number of image URLs and uploads the images from these URLs to S3. The files are served over HTTP. I download them using InputStream I get ...
polo's user avatar
  • 1,412
12 votes
1 answer
3k views

How to set concurrency limit per task (or queue) in Celery?

My example code is: run.py from celery import Celery, Task app = Celery( "app", task_serializer='json', accept_content=['json'], result_serializer='json', timezone='...
rzlvmp's user avatar
  • 8,798
11 votes
1 answer
2k views

MongoDB Concurrency Bottleneck

Too Long; Didn't Read The question is about a concurrency bottleneck I am experiencing on MongoDB. If I make one query, it takes 1 unit of time to return; if I make 2 concurrent queries, both take 2 ...
Lucio Paiva's user avatar
  • 20.3k
10 votes
0 answers
1k views

How to handle concurrent sftp connections in Node js. getting error No sftp connection available

for sftp we are using latest version of ssh2-sftp-client module(5.1.3) service file(sftpConnectionService) with sftp connection {Error: get->get: No SFTP connection available} class ...
vijaya nemala's user avatar
10 votes
3 answers
512 views

How can I process most jobs in parallel but serialize a subset?

We get concurrent callbacks to our web application from a vendor and we suspect it's causing us lost updates because they are processed at the same time on different machines. We need to serialize ...
awendt's user avatar
  • 13.4k
10 votes
2 answers
937 views

Does java.util.concurrent.Delayed really force me to violate equals/compareTo consistency?

Trying to use Java's DelayQueue, I have to implement the Delayed interface which requires a compareTo() "method that provides an ordering consistent with its getDelay method.". The intention is of ...
Harald's user avatar
  • 5,003
9 votes
0 answers
344 views

SwiftUI.PreviewProvider MainActor isolation warning

I am receiving two (duplicate) warnings about concurrency on a file that is simply a SwiftUI View. This has started to happen after I have added Swift Concurrency on other parts of the codebase. The ...
Pink's user avatar
  • 531
9 votes
1 answer
3k views

Is Guava's ListenableFuture still useful/ up to date (after Java 8)?

Since Java 8 some features from Guava are already obsolete (for example String joiner, optional values, preconditions check, Futures etc). In ListenableFuture documentation (currently with no update ...
JonyD's user avatar
  • 1,329
8 votes
1 answer
3k views

@MainActor closure does not seem to execute on the main thread deterministically

Consider the following, relatively simple Swift program: import Foundation func printContext(function: String = #function, line: Int = #line) { print("At \(function):\(line): Running on \(...
fwcd's user avatar
  • 111
8 votes
1 answer
7k views

What's the best practice for spring boot parallel outgoing requests?

I am building a Java Spring Boot (micro) service that basically have a single REST endpoint to retrieve data for some resource. To do that, per each incoming request I need to retrieve the information ...
user2339344's user avatar
8 votes
0 answers
2k views

Easiest way to parallelize filter and list operations

My program uses a lot of filter, all and list comprehensions which I believe are great candidates for parallelization (either via multithreading or GPU programming). So what would be the easiest way ...
Rufus's user avatar
  • 5,482
8 votes
2 answers
1k views

How is it possible for InnoDB to deadlock on a single row?

According to The Good Word, InnoDB uses automatic row-level locking. You can get deadlocks even in the case of transactions that just insert or delete a single row. That is because these operations ...
KeatsKelleher's user avatar
8 votes
0 answers
520 views

django db migration concurrently

I have multiple django apps connect to the same mysql db backend for high availability purpose. My question is, is it a problem if app instances try to migrate db concurrently? If so, what's the best ...
Yuming Cao's user avatar
8 votes
2 answers
514 views

Rows Rotation For Mysql Table Consumer Process in Round Robin

We have automation to login into different websites and perform some operations on website accounts. It is required that only one BOT can login simultaneously into a specific account to avoid ...
Hassan Akram's user avatar
8 votes
3 answers
989 views

Thread interrupt status getting cleared - possible Java bug

This is with reference to Path#register method. If a thread is running a block containing the method and another thread interrupts it beforehand. Then it is found that the method clears the interrupt ...
Jatin's user avatar
  • 31.6k

15 30 50 per page
1
2 3 4 5
347