Category "concurrency"

Edited: Retrofit and CompletableFuture, is there a way to not rely on the underlying connection pool?

Original question: OkHttp, is there a way to not rely on a connection pool? Hey OkHttp users and/or contributors! Is there a way to use an OkHttpClient withou

Two concurrent saveAll actions with a unique constraint

I am not using any type of locking. Is it possible that two concurrent saveAll requests trying to save the same set of records could collide with each other and

JavaFX thread should wait for background thread but without freezing the UI (JavaFX)

I want my main thread to wait until the background thread completes. But, this makes my UI freeze. I want to achieve this without freezing my UI. Please help me

Why is sleep in a child process blocking my program?

So I have this simple program that sleeps for 4 second if the value returned by fork is '0' meaning that the child process is executing, I've tried using sleep

Mutex does not seem to be locking properly

I am just learning about mutexess. I thought the following program would return a total of 1000, but I am getting varied results, so I assume I am doing someth

Is Apache EventListenerSupport thread safe?

Summary The org.apache.commons.lang3.event.EventListenerSupport is used in order to fire when some class performs a certain operation and wants to inform all li

DDD - Concurrency with quantity

Hi everyone, I'm a little bit lost with a problem thinking in ddd way. Imagine you have an application to sell concert ticket. So you have an entity which is ca

Can modern x86 hardware not store a single byte to memory?

Speaking of the memory model of C++ for concurrency, Stroustrup's C++ Programming Language, 4th ed., sect. 41.2.1, says: ... (like most modern hardware) the

Parallel/Concurrent Method Execution in JavaScript

I am wanting to learn how to run functions in parallel/concurrently in JavaScript. Over the past few days I've read several pages about promises, async function

Multiprocessing OpenCV in Python

I have a simple Algorithm, I want to run it fast in parallel. The algo is. while stream: img = read_image() pre_process_img = pre_process(img) text

How to know which specific runnable has died in my threadPoolExecutor?

I am running a fixed amount of threads using newFixedThreadPool() and need to be able to know when one of the runnables has died, and know which specific run

How to break time.sleep() in a python concurrent.futures

I am playing around with concurrent.futures. Currently my future calls time.sleep(secs). It seems that Future.cancel() does less than I thought. If the futur

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 sin

SWIFT TASK CONTINUATION MISUSE: leaked its continuation - for delegate?

I'm trying to extend my class with async/await capabilities, but at run-time there is an error in the console: SWIFT TASK CONTINUATION MISUSE: query(_:) leaked

How to setup Concurrency Thread Group

I have following test plan to test concurrent user load test of a website - Configuration set as - Target Concurrency = 10 Ramp up Time = 1 Ramp up step co

What is the difference between limitedParallelism vs a fixed thread pool dispatcher?

I am trying to use Kotlin coroutines to perform multiple HTTP calls concurrently, rather than one at a time, but I would like to avoid making all of the calls c

Is there BlockingMap as BlockingQueue in java?

I'd like to have one BlockingMap data structure which is very similar to BlockingQueue. The take method of BlockingQueue will wait there until element is availa

Incompatibility between Spring Kafka consumers with versions 2.3.13.RELEASE and 2.8.3

I am having problems with kafka consumers of applications with different versions of Spring-kafka, specifically between 2.3.13.RELEASE and 2.8.3. When deploying

Incompatibility between Spring Kafka consumers with versions 2.3.13.RELEASE and 2.8.3

I am having problems with kafka consumers of applications with different versions of Spring-kafka, specifically between 2.3.13.RELEASE and 2.8.3. When deploying

How to limit concurrency with Python asyncio?

Let's assume we have a bunch of links to download and each of the link may take a different amount of time to download. And I'm allowed to download using utmost