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.
concurrency
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 ...
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='...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 \(...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...