Questions tagged [multiple-processes]

the execution of multiple concurrent processes in a system

110 questions
1
vote
1 answer

Python: Multiprocessing with pool.map while main is still working

I am a few days into learning python, and would like to understand this. I am doing a file explorer, and want to speed up thumbnail creation. Watched a bunch of tutorials about multiprocessing, but none show hot to continue main(), while processes…
Leonick
  • 45
  • 7
1
vote
0 answers

Python: Pulling Data from Process Threads

How do I pull data from a thread that's located within a process? I'm trying to start multiple processes and within each process, create threads to do work. My multithreading knowledge is very limited and this is as far as I can get. import…
1
vote
1 answer

what is the pshared value of a semaphore if I used sem_open() instead of sem_init()?

I am currently working on the dining philosophers problem using semaphores and processes, and I used sem_open() function to create semaphores instead of sem_init(). And since the sem_open() doesn't take the pshared value as a parameter. Could…
shrooma
  • 53
  • 1
  • 7
1
vote
0 answers

Fork() multiple children at once

I am trying to create a c program where I fork a total of 4 children.. ... When the first child is created, the parent waits until it finishes ... The last three children are forked (at the same time) and can finish at their own pace ... My…
markio
  • 11
  • 2
1
vote
1 answer

vb.net - managementeventwatcher not capturing a second instance of any process

I've got an application which is watching over executed processes on a device using a managementeventwatcher, like so... Dim wmiq As String = "SELECT TargetInstance FROM __InstanceCreationEvent WITHIN .025 WHERE TargetInstance ISA…
John
  • 755
  • 1
  • 18
  • 46
1
vote
1 answer

Implementing multiple producer and multiple workers results in deadlock

I have been trying to implement a multiple producer and multiple consumer model using multiprocessing in python. Producers Scrape data from the web and Consumers process the data. At first I just implemented two function producers and consumer with…
1
vote
1 answer

How to run multiple Thread in Python

I have all 50 chrome must run. I want to always run 5 chrome at the same time. If 1 in 5 chrome closes first, it will run 1 chrome new. Until 50 chrome finished. Example: 5 chrome are running. If chrome 3 closes first, chrome 6 will run. So it…
1
vote
1 answer

Concurrent futures in python doesn't wait for processes to finish

I've got a function, main(), that generates 4 processes, and starts executes them eventually, but it loops over this whole block of code once it begins several times. What I want to have it do I think is apparent; print "hello1", execute the…
1
vote
2 answers

how to run multiple children with different tasks?

My program has to create multiple children, i take the number of children from terminal. Then, I need to group them and every group has different tasks. I created the children but the problem is that I can't give them separated tasks, I can't…
Wokers
  • 107
  • 3
  • 13
1
vote
1 answer

worker_exit of Gunicorn

I am using Gunicorn to deploy an Django app. There is a global singleton variable defined in util.py: global SNS_PRODUCERS SNS_PRODUCERS = {} def close_producers(): logger.info('Closing all producers...') global SNS_PRODUCERS for name,…
BAE
  • 8,550
  • 22
  • 88
  • 171
1
vote
1 answer

How to create a function that can wait for multiple processes to exit?

I am creating a windows service that will write all the start time and exit time for specific process that I wanted to monitor. The problem is when I am trying to monitor the process to wait for exit, I have no idea on how to wait multiple process…
1
vote
1 answer

Python: Process VS Thread. What is the difference when only run 1 progress/thread

I knew that Process and Thread are totally different things. But I have a question about them. Since Python has GIL, so is there any performance difference between a single thread and a single process working on a task? edit 1: I think there is no…
Xi Chen
  • 101
  • 1
  • 2
  • 7
1
vote
1 answer

Shared config variable between multiple processes

Say you have a config.py which inside has settings = read_yaml('settings.yaml') so config.settings is a dictionary. in one script foo.py you have: import config config.settings['foo'] = str(time.time()) write_yaml('settings.yaml',…
1
vote
3 answers

Weird behaviour with numpy and multiprocessing.process

Sorry for the long code, I have tried to make it as simple as possible and yet reproducible. In short, this python script starts four processes that randomly distribute numbers into lists. Then, the result is added to a…
Frederico Schardong
  • 1,946
  • 6
  • 38
  • 62
1
vote
1 answer

C# child process behaviour after parent crash

I have a simple yet interesting question. I need to start a process (a node.js server) from a C# application. I found a piece of code explaining how to start the server from within the application. Process p = new Process(); …
user7774642