Questions tagged [multiprocess]

Concerning running parallel code in separate processes (unlike multithreading) and/or related to package `multiprocess` from PyPI.

462 questions
4
votes
3 answers

Debugging processes spawned by another

I have written a program that spawns a handful of processes. By default, Visual Studio does not debug the new processes -- only the original process that created the new ones. Is there a way to automatically, in code, connect Visual Studio up to the…
David Pfeffer
  • 38,869
  • 30
  • 127
  • 202
4
votes
2 answers

Multiprocess and Multiprocessing with no file IO: OSError: [Errno 24] Too many open files

Summary: I'm trying to use multiprocess and multiprocessing to parallelise work with the following attributes: Shared datastructure Multiple arguments passed to a function Setting number of processes based on current system Errors: My approach…
Andrew
  • 183
  • 1
  • 8
4
votes
2 answers

Can the threads of the same process run on different core?

Can the threads spawned by a process run on different cores of a multicore system? Let's say I have a process P from which I have spawned two threads t1 and t2 and it's a multicore system with two cores C1 and C2. My questions are: Can the treads…
aja
  • 129
  • 1
  • 11
4
votes
2 answers

Python / Celery : how can I kill subtasks when killing a parent task?

Context I've created a Django application that is calling a celery task which in turns spawn other tasks and wait for them to be finished. Here's the workflow : 1) The main python/django code start a celery task in the background 2) The celery task…
alletek
  • 41
  • 5
4
votes
0 answers

Permission error using multiprocessing in Python 3.5 with unknown origin

I'm facing a strange bug. I have a parent process that spawns two child processes with infinite loops that provide different services. Each child shares a multiprocessing.manager.list() variable type with the parent process. All processes (parent…
4
votes
2 answers

Getting LiveData updates in multiple processes

In my Android application I use the Room API to persist data that comes from the network. The app is split into several processes, with one of them responsible for syncing the data (implementing SyncAdapter). The UI is running on a different…
ArikYa
  • 146
  • 6
4
votes
1 answer

Combine dataframes returned from python multiprocess calling function

from multiprocessing import Pool with Pool(processes=6) as p: p.starmap(update_tabl, zip(r)) I am using the approach outlined here: https://web.archive.org/web/20170625154652/http://n-s-f.github.io/2016/12/23/starmap-pattern.html to…
user308827
  • 21,227
  • 87
  • 254
  • 417
4
votes
1 answer

Broadcast IPC on Linux

I have the following requirements for an IPC mechanism on Linux: There is a single producer process, but multiple consumer processes. The consumer processes are not children of the producer process. They are brought up independently. The messages…
Rajiv
  • 2,587
  • 2
  • 22
  • 33
4
votes
2 answers

Is there an 'upgrade_to_unique_lock' for boost::interprocess?

I am looking for the best way to effectively share chunks of data between two (or more) processes in a writer-biased reader/writer model. My current tests are with boost::interprocess. I have created some managed_shared_memory and am attempting to…
Courtney Christensen
  • 9,165
  • 5
  • 47
  • 56
4
votes
4 answers

Calculate the fibonacci numbers in multiprocess way?

I am writing multi process fibonacci number calculator , I have a file that keeps track of the fibonacci numbers , first process open the file and write first fibonacci numbers (0 and 1 ), then do fork and its child process read the last two numbers…
Burak Dede
  • 3,725
  • 5
  • 40
  • 53
4
votes
5 answers

CreateFileMapping, MapViewOfFile, handle leaking c++

Background: I am trying to create a memory mapped file that can be accessed by multiple processes. In the below code I only put in the code that pertains to the question I currently have to make things simpler. According to msdn I should be able to…
longlostbro
  • 528
  • 2
  • 7
  • 24
4
votes
2 answers

Getting nsIChannel request's nsIDOMWindow always returns null on e10s

I have an observer on "http-on-modify-request" and I need to get the DOMWindow that request is associated with. The following code was taken from AdBlock Plus and is based on this article. function getRequestWindow(/**nsIChannel*/ channel)…
josesigna
  • 488
  • 3
  • 16
4
votes
2 answers

python threading/fork?

I'm making a python script that needs to do 3 things simultaneously. What is a good way to achieve this as do to what i've heard about the GIL i'm not so lean into using threads anymore. 2 of the things that the script needs to do will be heavily…
daniels
  • 18,416
  • 31
  • 103
  • 173
4
votes
1 answer

Multi-threaded psycopg2 and python not returning results

I have a program where the parent process has a DB connection, and each child process has its own DB connection (created in the constructor), using python 2.6 and psycopg2. Every 5 seconds, the parent process queries the DB to get a progress report…
4
votes
3 answers

OpenMP not supporting break in loop

I am optimizing some code with OpenMP. If NO_VALUE is met in a loop, I would like it to break. However, compiler tells me this is not allowed with openMP. How could I handle this? #pragma omp parallel { #pragma omp for …
kiriloff
  • 25,609
  • 37
  • 148
  • 229