All Questions
Tagged with process multiprocessing
320
questions
0
votes
0
answers
33
views
Does processes triggered by ProcessPoolExecutor.submit have any kind of interference with each other?
Background:
.
├── app.py # API source code file
├── worker.py # CPU-bound task
I am using ProcessPoolExecutor().submit() in app.py to execute an entrance function main() stored in worker.py. As long ...
2
votes
1
answer
35
views
Stop process from another process
Hi guys I have two different processes running at the same time.
I'm trying to stop the other process which i have named loop_b
but I have only managed to stop the current process and the other doesn'...
0
votes
0
answers
12
views
How do I divide a matrix into chunks, per row, and allocate each chunk to a process?
So I have been trying to divide my matrix into chunks of rows and allocating them to processes(using
pool
from multiprocessing)
For example, what I have done so far:
parser.add_argument("-p",...
2
votes
0
answers
70
views
Initial Fastapi request is not being processed and stays on hold
I have a worker fastapi. This api basically creates worker functions and then some data will be processed. My problem arises at the start of these workers. When I first try to make a request, the ...
0
votes
0
answers
35
views
python class variable not updated when passed to new Process [duplicate]
Why doesn't a new Process get the updated class attr value (in Windows btw). (It's the same if the attr was just a str). I'm guessing the 3rd case worked because assignment gave it a instance attr.
...
0
votes
0
answers
62
views
Is there a way to run multiple processes on two different cores in python at the same time?
I am building a app using tkinter and customtkinter. I want it to update the screen every single second but every 3 seconds I want it to get the price of certain stocks that are in a list of stocks....
0
votes
2
answers
62
views
In Python, multiple processes in a process pool encountered errors while modifying shared variables generated by the Manager module
from multiprocessing import Pool, Manager
def task(args):
k, v, sharedDict, lock = args
with lock:
if k not in sharedDict:
sharedDict[k] = {}
sharedDict[k]['...
0
votes
1
answer
32
views
How can I safely access a variable between Python processes which use ProcessPoolExecutor?
I have a script that uses multiprocessing to execute many io-bound tasks. I want to access a variable between processes in a safe manner. Is there a simple way to do this does not involve low level ...
0
votes
0
answers
218
views
Multiprocessing in python for mqtt data
I have a question regarding the use of multiprocessing .
I have a set up, where I need to subscribe mqtt data and do some process on the data in python.
Everything should happen in real time ie ...
2
votes
1
answer
1k
views
Multiprocessing Process Pool Executor blocking submit function
I am trying to turn my executor.submit function call into a blocking function so that it waits until the ProcessPoolExecutor pool has available workers.
In other words, initially it should print 1,2, ...
0
votes
1
answer
70
views
Create child processes from array not working
I don't understand which logic to use to open the problem. I don't have a hierarchy I need to have.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
//prototype(s)
void ...
0
votes
1
answer
47
views
How to run several python scripts in one file concurrently?
I want to run several python scripts from the main file and make them work in parallel.
I would like to print their outputs in a console if it is possible.
It's better to run them in different ...
0
votes
1
answer
824
views
Gracefully handling keyboard interrupt for Python multi-processing
I am working on a project which runs two separate python processes. When I do a ctrl + c to end the program, I would like the program to end gracefully.
I can produce a minimum working version of the ...
0
votes
0
answers
144
views
Python chess multiprocessing, no speed gaining
Im trying to write a chess game in python, its almost complete, and I would like to use multiprocessing to speed up my program, but what I have done it has quite the opposite effect ;D
Original ...
1
vote
0
answers
105
views
parallism python using multiprocessing
I have been trying to use multiprocessing module from python to achieve parallism.
I'm able to execute my code, it run in parallel but after some time just only one process finishes its task and the ...