Vizonex / Winloop

An Alternative library for uvloop compatability with windows
https://pypi.org/project/winloop
Apache License 2.0
74 stars 7 forks source link

Winloop is not work in uvicorn multiprocessing #11

Open yangy996 opened 6 months ago

yangy996 commented 6 months ago

In uvicorn, I have added a new file “winloop.py”. image uvicorn/config.py: image

Next: from uvicorn import run run("app_compat:create_app_fastapi", host="0.0.0.0", workers=int(args["workers"]), port=int(port), loop="winloop", factory=True)

Result: image Pid is 23052 and 4604.

Just,It is only running on PID 4604.

Vizonex commented 6 months ago

@yangy996 There is still some work to be done around multiprocessing including aiomultiprocessing . Even I am having trouble understanding why it fails to work. We had an update recently so if you are on it, try using it and then see if you're still having the same issue. I am working on writing a unittest soon for multiprocessing problems in general. Try using version 0.1.0 to help you figure out if these problems still exists.

yangy996 commented 6 months ago

@yangy996 There is still some work to be done around multiprocessing including aiomultiprocessing . Even I am having trouble understanding why it fails to work. We had an update recently so if you are on it, try using it and then see if you're still having the same issue. I am working on writing a unittest soon for multiprocessing problems in general. Try using version 0.1.0 to help you figure out if these problems still exists.

The current version is 0.1.0.

Vizonex commented 6 months ago

I am currently dealing with the blue-screen of death at the moment on my pc so your going to have to wait until I can fix it. I apologize for the inconvenience at the moment. 797DACF6-26DD-44B6-B7F5-7C81DB4D7686

When I get this problem solved I plan to first test aiomultiproccess and then go in by debugging everything step by step at a time until it finally works correctly.

Vizonex commented 5 months ago

@yangy996 aiomultiproccessing and multiproccessing works fine now since our update so I guess my friend fixed it #14 And I just uploaded test suite on top of that. I would like your conformation first though before I decide to close this issue.

yangy996 commented 5 months ago

The current version is 0.1.1 It is not work. S2FCC32728 CJ_UNX}VYBUC

Vizonex commented 4 months ago

I was able to get it to spawn in 2 pids using a test via the aiomultiprocess library I will try to extend this into uvicorn very soon.