Category "multithreading"

Post request with threading

Here is my snippet: urls = ["http://goggle.com", "http://linux.com"] headers = {'Content-type': 'application/json', 'Accept': 'text/plain'} data= {"k1": "v1"} f

Locust Python: Kafka Consumer in a separate thread

I'm using Locust for load testing. I want to register a Kafka consumer in separate thread to measure the time of message processing. Here is what I got now: def

Is .GetAwaiter().GetResult(); safe for general use?

I read in a few places that .GetAwaiter().GetResult(); could cause deadlocks and that we should use async/await instead. But I see many code samples where this

Parallelizing different functions at the same time in python

I want to execute f1 and f2 at the same time. but the following code doesn't work! from multiprocessing import Pool def f1(x): return x*x def f2(x): return x

Why did the Django model return an empty queryset in the thread pool?

I used ThreadPoolExecutor in my API. in the test case, I generated a Movie instance and saved it in the database (PostgreSQL). I printed movie count in the test

what happens if thread calls join() on itself

From what i read here Thread join on itself ; When join method is called on itself, it should wait forever I am currently preparing for ocajp 8 certificatio

How to read into a running processus in c?

Hi how to read into a processus and how to use IMAGE_FILE_HEADER to read the pe header in this processus, thanks for replies:) sorry for my english i'm french

static ScheduledThreadPoolExecutor in CompletableFuture.Delayer

In java-9 the new method completeOnTimeout in the CompletableFuture class was introduced: public CompletableFuture<T> completeOnTimeout(T value, long time

Is the `is` operator thread-safe/atomic in C#?

Is the following code thread-safe? public object DemoObject {get;set;} public void DemoMethod() { if (DemoObject is IDemoInterface demo) { dem

I am parsing RoboCopy logs from Millions of files, How can I make my code run Faster?

New to StackOverflow, I'll do my best to post correctly :) Hoping someone can help me to get my code running faster. The code is run against RoboCopy Migration

How to sleep a thread in java for few milliseconds?

I would like to sleep a thread for 1ms. I used to implement the sleep in java code with Thread.sleep(x) being x the amout of milliseconds that I want to sleep.

Creating multiple threads in C

I am just a beginner in Programming using C.For my college project I want to create a multi-threaded server application to which multiple clients can connect an

Why Rust prevents from multiple mutable references?

Like in the topic, why Rust prevents from multiple mutable references? I have read chapter in rust-book, and I understand that when we have multi-threaded code

Why is future.get() always timing out for Volley RequestFuture?

I am trying to make a synchronous Volley networking request. I am using request futures to wait on a response, but the future.get() call always times out (no ma

Ways to make maven build faster?

I have a multi module java project. Maven takes almost around 40 secs to build it. I have tried maven with multi threaded builds too by specifying -T and -C arg

How do I keep my Async method thread safe?

I need to write a method in my Windows Universal App to write to the SD card. How can I ensure two threads do not try to write to the same file at the same tim

Does the Choco-Solver Java library support Parallel Programming?

My constraint problem has become too complex, and I'm looking to know if the Choco-Solver framework which I'm using to model and solve the problem supports a pa

Is it possible to read a value from memory being written by another thread, so that it's neither the original nor final?

Suppose we have a variable in memory, which is constantly being updated by a thread of execution by doing something like MOV into it with alternating values (si

How can I import thread package in Python 3?

I want to import thread package in Python 3.6. But this error is occurred: import thread ModuleNotFoundError: No module named 'thread'

DataGridView ScrollBars are not working after Thread

I'm setting a dataTable as data source of a datagridview. I do this on a new thread (I don't want my UI blocked while is loading data). My dilema is: the scroll