I am trying to create a Python 3 program with one or more child processes.
The parent process spawns child processes, and then continues its own business, from time to time I want to send a message to a specific child process that catches it and takes action.
In addition, the child process should not be blocked while waiting for the message, it will start its own loop that supports the connection to the server and send any returned messages to the parents.
I am currently looking at multiprocessor, threading, subprocess modules in python, but could not find any solution.
What I'm trying to achieve is to have the bulk of the program that interacts with the user, taking care of user inputs and presenting information to the user. This will be asynchronous from child parts that interact with different servers, receiving messages from the server and sending the correct messages from the user to the server. Then the child processes will send information back to the main part, where they will be pressed against the user.
My questions:
- I am going to do it wrong.
- Which module is best to use
2.1 How do I configure this.
source share