Concerning running parallel code in separate processes (unlike multithreading) and/or related to package `multiprocess` from PyPI.
Questions tagged [multiprocess]
462 questions
0
votes
1 answer
Multiple instances of a process running on single core
I have a Linux box with 4 CPUs, and when I run a process on it, it processes 1.5 million records in 30 mins. Here processing means reading from oracle DB, deriving some stuff and writing 1.5 records to the file system in a file.
We were now…

pradipti
- 85
- 8
0
votes
1 answer
Do I need to sign child processes?
We are altering the structure of our Windows c#.net 4 application to being multiprocess. The UI is in the main exe, and that spawns child exe processes to do tasks.
We use a digital signature (ie. with Signtool.exe) to sign the UI exe. For windows…

Sugrue
- 3,629
- 5
- 35
- 53
0
votes
0 answers
How can I share data between child and parent (following fork()) in Linux?
How can I share data between child and parent in Linux (not Windows)?
Source files:
1.h
extern int a;
extern int b;
2.h
#include "1.h"
void adder();
2.c
#include "2.h"
void adder()
{
a++;
b++;
}
1.c
#include "1.h"
#include "2.h"
int a…

anaiskaril
- 1
- 2
0
votes
0 answers
How to rename a file on windows if multiple process already opened that in C on windows
I want to take backup of a file once it reaches a particular size. The file is associated with stdout stream for multiple process.
I doubt if freopen can be used in this case as it is associated with multiple process.
Though it may succeed with the…

Venkat
- 1
0
votes
1 answer
epoll in multi process environment
In my client app I am using epoll and udp socket to receive packet from the server. Client app has two process, p1 and p2.
Using this function to get fd's sock = socket(AF_INET, SOCK_DGRAM, 0) ;
In process P1, socket() function returns fd's…

Inspired
- 1
- 1
0
votes
1 answer
Control process concurrency in PHP
I have programmed a simple app that every X minutes checks if an image has changed in several websites and downloads it. It's very simple: downloads image header, make some CRC checks, downloads the file, stores in a MySQL database some data about…

Ivan
- 14,692
- 17
- 59
- 96
0
votes
1 answer
Start a server process and connect to it as soon as possible
In my python program I am trying to use rpyc library to start a server as a separate process. As soon as I do that, I want to be able to connect to that server. Since it takes some time for the process to start, I need to delay connecting to it. I…

Aviral Goel
- 308
- 1
- 3
- 13
0
votes
0 answers
Pytonic way of passing values between process
I need a simple way to pass the stdout of a subprocess as a list to another function using multiprocess:
The first function that invokes subprocess:
def beginRecvTest():
command = ["receivetest","-f=/dev/pcan33"]
incoming = Popen(command,…

Jalcock501
- 389
- 2
- 6
- 18
0
votes
1 answer
is multiprocessing.Pool making use of all my processes?
My code gets events notification and I used to process the events as soon as I get them. Earlier it was single threaded, but the events notification was quite fast to handle them. I changed my code to use multiprocessing using Pool. Here's what I…

user2912295
- 13
- 2
0
votes
1 answer
Writing a Shared Queue for a multi-process c/c++ program
Can anyone give me a good example of a multi-process shared queue (FIFO) in C/C++?
Please note, I am not looking for a thread(pthread) based implementation. Although I welcome suggestions for multi-threaded as well..
Basically looking for something…

tsar2512
- 2,826
- 3
- 33
- 61
0
votes
2 answers
Reactive event loop in Python
I'm trying to build a system that collects data from some sources using I/O (HDD, network...)
For this, I have a class (controller) that launch the collectors.
Each collector is an infinite loop with a classic ETL process (extract, transform and…

Garet
- 365
- 2
- 13
0
votes
2 answers
Recursive multi-process program in c
I am working on a fairly simple program that should print out a file tree given a path. The program worked with just straight recursion but when I modified it to fork a new child process to iterate over each new directory I started getting some…

bvallerand
- 49
- 1
- 10
0
votes
1 answer
Run Python with IDLE on a Windows machine, put a part of the code on background so that IDLE is still active to receive command
class PS():
def __init__(self):
self.PSU_thread=Process(target=self.read(199),)
self.PSU_thread.start()
def read():
while running:
"read the power supply"
def set(current):
"set the…

Frank Li
- 3
- 2
0
votes
2 answers
Dynamically add arguments to a Pool of workers
I'm looking a way to dynamically add arguments to a Pool of workers during the same iteration. So, in the case some of these fails I'm able to promptly re-process it.
from numpy import random
from multiprocessing import Pool
from time import…

Alessandro Mariani
- 1,181
- 2
- 10
- 26
0
votes
4 answers
Set a timer for running a process, pause the timer under certain conditions
I've got this program:
import multiprocessing
import time
def timer(sleepTime):
time.sleep(sleepTime)
fooProcess.terminate()
fooProcess.join() #line said to "cleanup", not sure if it is required, refer to goo.gl/Qes6KX
def foo():
…

gabmus
- 53
- 6