All Questions
Tagged with parallel-processing multithreading
3,219 questions
2
votes
1
answer
89
views
Powershell script error when using parallel processing
I'm using PowerShell with -Parallel to speed up a script that checks file formats using ImageMagick. The script works without parallel processing, but it's too slow with a large number of files. When ...
1
vote
0
answers
100
views
Loss of precision in Parallel.For loop [duplicate]
I am trying to perform calculations on a large (300000+ items) array of doubles. I have tried iterating through this array with a regular for-loop. This works, but is rather slow. I then tried using a ...
0
votes
1
answer
44
views
Rayon Threadpool, why is the exit thread call back not executed?
I am trying to learn about rayon's thread pool. And to that effect I want to make a simple program where a set of tasks is added to the pool, and then when the last task in that batch executes it adds ...
0
votes
0
answers
99
views
Unable to achieve multithreading in WSL2
I'm trying to execute the following C++ multi-threaded program on WSL2:
#include <iostream>
#include <pthread.h>
#define N 1024*1024*1024
#define num_threads 8
using namespace std;
long x[...
0
votes
0
answers
42
views
Optimizing Bulk Image Download in Flutter (5000 Images in Under 30 Seconds)
I am working on a Flutter project where I need to download 5000 images (each 2500x2500 px) as fast as possible, ideally within 30 seconds. These images are fetched from Lorem Picsum and stored in the ...
0
votes
0
answers
42
views
Deadlock issue when scheduling task computations (F#, .NET TPL)
I am in the process of building an effect system DSL with F# inspired by ZIO and Cats Effect.
I have my effect type defined as a DU of opcodes, a fiber type, a channel type for message passing, etc. I ...
0
votes
0
answers
51
views
How to Efficiently Process a Concurrent Queue Using a Thread Pool in Java?
I'm working on a Java application where I need to periodically check a MongoDB collection (CacheBilgi) and enqueue new data into a concurrent queue (cacheInfoQueue). Then, I need to process this queue ...
0
votes
1
answer
49
views
The thread running under multiprocessing.Process does not update its instance attributes [closed]
I want to run several class instances in parallel and update the instance attributes using Redis. On each class instance, I run a thread in the background to listen to redis for changes. When I run ...
0
votes
1
answer
70
views
Parallelize a list of subsequent api calls in Python
I have some code that cycles through some files and then makes subsequent calls to a "chain" of multiple APIs using contents from each file, where each API needs the output of the previous ...
2
votes
2
answers
94
views
How to process a massive file in parallel in Python while maintaining order and optimizing memory usage?
I'm working on a Python project where I need to process a very large file (e.g., a multi-gigabyte CSV or log file) in parallel to speed up processing. However, I have three specific requirements that ...
1
vote
0
answers
50
views
java parallel streams to exclude main thread as worker thread
Does Java parallel stream process all substreams in worker threads, I see the main thread is also used as a worker thread.
Sample program:
package org.example;
import java.util.Arrays;
import java....
0
votes
0
answers
66
views
How can I prevent Task.Run and Parallel.ForEach from using the "outer" thread?
My "outer" code running under a thread (obviously). That outer code calls Parallel.ForEach and/or Task.Run, and the outer thread also gets used inside those methods.
Consider this code:
...
1
vote
0
answers
51
views
Speedup ratio and parallel efficiency of implemented simple parallel matrix multiplication
The following is my source code for parallel calculation matrix multiplication, which tests the parallel efficiency obtained by the number of 1, 2, 4, 8, 16, and 32 threads, respectively.
My Operating ...
0
votes
1
answer
63
views
How to merge private arrays into a shared one in OMP - C?
I am trying to parallelize a program for finding local maxima using reduction. However, I am encountering a problem during the merging process: the merged array ends up containing exactly two fewer ...
0
votes
1
answer
76
views
How to launch 2 requests in python in parallel
I want to execute 2 functions in Python that execute requests under the hood. I don't mind to wait until the two have finished, but they should be executed in parallel.
I tried to use the concurrent....