All Questions
Tagged with parallel-processing concurrency
800 questions
0
votes
1
answer
141
views
How can I optimize my 'foreach' loop to read and process each line of a text file more efficiently in C#?
I have C# code that reads a .TXT file, processes each line, and subsequently inserts documents into a MongoDB database. Since the file contains many lines (approximately 70k), both reading all lines ...
-3
votes
1
answer
56
views
How to safely thread DBContext in EF Core using Parallel.ForEachAsync [closed]
I am attempting to do some parallel processing interacting with a DbContext in EF Core as follows:
var processingGroups = GenerateProcessingGroups(subscriptions);
await Parallel.ForEachAsync(...
1
vote
0
answers
39
views
How to make flask asynchronous to handle multiple users at the same time?
I spun up a cloud server and put my flask web app code plus a frontend in there. When a user runs an operation on the frontend this gets sent to the backend endpoint as a JSON, then processed and ...
1
vote
1
answer
298
views
Parallelising dlthub Rest API pipeline
I am trying to speed up the following dlt (dlthub) pipeline via parallelisation as shown in the documentation here: https://dlthub.com/docs/reference/performance#parallelism
Here is the original (NOT ...
0
votes
0
answers
245
views
Should I use separate processes or worker threads with BullMQ for asynchronous tasks in NestJS?
I have a typical NestJS application and I integrated BullMQ to make use of queues for the following cases:
Triggering emails and push notifications
Making database reads and writes at specific dates ...
0
votes
0
answers
39
views
Event loop blocking in NodeJS
stack overflow community.
I have an app that interacts with Docker using dockerode library in NodeJS. I'm generating services using it and everytime new service is being started, it builds unique ...
0
votes
0
answers
35
views
How do I parallelize code where each worker needs to operate in a separate folder?
I have some code (let's call it a function do_stuff(x)) which makes calls to an external executable using subprocess.run. That external executable needs to read and write local files with hardcoded ...
0
votes
1
answer
79
views
How to combine asynchronous I/O and CPU-bound tasks efficiently in Python?
I'm working on a Python project where I need to handle both asynchronous I/O tasks (like reading from a file or making API requests) and CPU-bound tasks (like data processing or calculations). I’m ...
0
votes
0
answers
57
views
A formal+didactic+schematic explanation of concurrency vs parallelism
tl;dr I think I have understood the concurrency vs parallelism examples below, but only really to the extent of those examples, and I'd like to get a more formal explanation that would allow (or help) ...
0
votes
0
answers
55
views
How can I use a thread pool to enable parallel processing in my Rust search application?
I'm working on a Rust application that searches for a query string in a file, and I want to utilize a thread pool to perform the search in parallel. Below is a simplified version of my code:
use std::...
-1
votes
2
answers
107
views
What problems might arise from ignoring this race condition?
I wish to represent a service that receives triggers to run a particular task, however it only runs that task once at a given time while ignoring concurrent triggers.
My brain came up with an ...
1
vote
0
answers
123
views
OpenCL flush absurdly slow, seemingly triggered by clEnqueueReleaseGLObjects in OpenCL/OpenGL interop
I'm writing an interactive application which uses OpenCL 1.2 to render each frame and which uses OpenCL-OpenGL interop to copy the frame to an OpenGL texture which is finally rendered via OpenGL. The ...
0
votes
2
answers
176
views
Options to achieve parallel execution in C#
I have a use case where I need to process n number of operations, which involves other I/O operations.
Method 1: Uses ConcurrentBag<T>.
But worried that the I/O operations in the ...
0
votes
0
answers
84
views
Why is my OpenMP based Code not getting any speedup?
I am trying to fill in "valid points" into a vector of vectors and I do it with the use of local vector of vector which I then merge. I also write the time measuring strategy for ...
1
vote
1
answer
218
views
OpenCL 1.2: Global memory consistency surrounding atomic operations?
I'm trying to implement global synchronization in OpenCL 1.2 using atomics and was wondering if there's any way to ensure that reads from different work groups (that provably -- by the logic of the ...