April 1, 2023, 5:06pm
I am using a python socketio async server. I have several processes that can occur in my backend. Each user in my website can send a socket to the backend and execute their own process however, in my terminal, each users process is executing one at a time.
async def trainit(sid,data,code):
my trainmodel function is running one at a time, however I want every process to run in parallel.
April 2, 2023, 4:29pm
Let us start with operating system, go over to python and then come back to socketio.
With your question in mind I would think of parent process and child processes if ever.
I assume python socketio can not go above what is possible within operating system itself.
I found a fine discussion including python samples here:
Is there a way for multiple processes to share a listening socket?
Python Docs Multiprocessing
Search within python socketio docs on multiple processes