Category "concurrency"

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

Deadlock involving SELECT FOR UPDATE

I have transaction with several queries. First, a select rows with FOR UPDATE lock: SELECT f.source_id FROM files AS f WHERE f.component_id = $1 AND f.a

Python Multiprocessing concurrency using Manager, Pool and a shared list not working

I am learning python multiprocessing, and I am trying to use this feature to populate a list with all the files present in an os. However, the code that I wrote

How do I atomically increment a variable in Swift?

I want to be able to increment a counter atomically and I can't find any reference on how to do it. Adding more information based on comments: Are you using GCD

@MainActor is not safely when it used with propertyWrapper?

Combined use @mainActor and propertyWrapper is not safe? The code will execute directly in the background thread. It is a bug? Here is the demo: struct DetailVi

How can I conform a Swift actor to a protocol while preserving isolation?

Let's say we have the following goals: We want to use actors. We want to use dependency injection and resolve actors through DI. We want to hide our actors behi