Category "multithreading"

does pthread_join affects concurrently

I want to run all threads concurrently. If I use pthread_join function does it affect running of threads concurrently? pthread_join(..)

Run loom demo on IDEA

I want to run loom's demo, I downloaded jdk18-loom from http://jdk.java.net/loom/, and downloaded the latest version of IDEA: No matter I choose X or 17-previe

Error while popping out Flask app context

I am trying to create an async API using threading (Celery is an overkill in my case). To achieve the same, I subclassed the Thread class in following manner. S

Simulate Time Series Events with Accurate Scheduler

I have an API which I will need to run some tests. We have already done the stress and load testing but the best way to test is to run some real life data. I ha

Multithreaded socket programming : sharing variable

Hi I want to implement a ring of sockets .For example IP address 127.0.0.1 listens to 127.0.0.3 and this one listens to 127.0.0.2. They are supposed to share so

Is it possible to pause/resume a web worker externally?

I've seen that web workers have a terminate() function, but is there a way to pause and resume web workers from the host thread similar to interrupts? The crit

Run a while-loop as subprocess in background

Unhappily my last post was marked as duplicate and my problem wasn't solved. So I've to phrase it a little bit different. Below you can see my main-file(SP_Tes

Making Consumer/Producer Problem a bit Advanced

Is there any way for the Consumer/Producer problem in synchronization could be made more advanced by introducing some scenario or making it a little bit more co

How to define a non blocking input in C++

I'm making a multithread application in C++. In particular, a secondary thread is involved in input operations, the problem is that std::cin is a blocking instr

Python ThreadPoolExecutor is faster than a loop for CPU-bound task. How come?

Recently I've been working on a project, and found behaviour that I don't understand. We have endpoint that fetches documents from mongodb and then applies tran

Create multiple threads by extending Thread class that share same object in Java

I was going through basics of multithreading and was writing a program to understand the difference between using the 2 approaches of creating threads. I have r

Execute a single task with multiple threads on a schedule

I have a function foo() that I want to be invoked by multiple threads on an interval. example: want to execute foo() every 100ms with x number of threads. I am

CountDownLatch: object not locked by thread before wait()

I want to pause the main thread until the other thread finishes. I tried CountDownLatch and semaphore. but none of them worked. I got the same error for both.

Should multithreading be used in microservices?

Should parallel programming be used in the development of microservices in case the microservices are scalable and, for instance, deployed as ECS on AWS? If ye

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

AsyncTask as kotlin coroutine

Typical use for AsyncTask: I want to run a task in another thread and after that task is done, I want to perform some operation in my UI thread, namely hiding a

Dispose ReaderWriterLockSlim after ExitWriterLock

I have a function to clean up some objects as well as the ReaderWriterLockSlim. But I need the ReaderWriterLockSlim to lock as writer lock to prevent the other

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

Multi-Threaded Python scraper does not execute functions

I am writing a multi-threaded python scraper. I am facing an issue where my script quits after running for 0.39 seconds without any error. It seem that the pars

"Failed to find cgroup for tid XXX", application crashes with background thread

I'm trying to build a custom launcher for Android, and I'm following this guide to have a clue of what I'm doing. Till the first part everything's ok, it works