Category "multithreading"

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

problems getting ThreadedTCPServer to work with selenium and report-portal

I've encountered a behavior that I simply do not understand. Implementing a ThreadedTCPServer with selenium was working fine until I decided to attach reportpor

How to collect, store and organize output with network and threading?

Need your help and suggestion, I'm collecting data from networking devices and I'm storing it to dictionary "output_dict={}" at the same time I'm going to use t

Killing a thread or an asynchronous task

let's say I use a jar that IBM has created. Let's say that this Jar has a function that I need but is ultimately build as such: while (true) { System.ou

Tried to implement Leetcode's FizzBuzz multithreading question from scratch. Getting "libc++abi.dylib: terminating" error

I started learning multithreading a few days ago because of a coming internship interview. I learned it and tried to solve Leetcode's FizzBuzz multithreading qu

Tried to implement Leetcode's FizzBuzz multithreading question from scratch. Getting "libc++abi.dylib: terminating" error

I started learning multithreading a few days ago because of a coming internship interview. I learned it and tried to solve Leetcode's FizzBuzz multithreading qu

Can I Set The Number Of Threads From An External FIle in Apache Jmeter?

I have many JMeter scripts that are testing different scenarios and I want to create a configuration file for some common values across my scripts, so I will no

How to import functions from an external namespace onto my project in c sharp

I want to import functions from a different namespace in an external file into my c sharp project. But what's the right method to do it. I copied the .cs file w