farc
farc copied to clipboard
Dining Philosophers Problem deadlock, Windows Python 3.11.5
Hello,
Just a few issues/questions:
-
I picked up tried to run this recently on Windows 10, Python 3.11.5. It seems to deadlock now.
-
Any thoughts of using coroutine and tasks? I'm thinking that version would more like the pre-emptive kernel when this on is the vanilla?
-
Any thoughts on using a libary like Trio? I think it can handle the Windows Ctl-C issue propertly... https://trio.readthedocs.io/en/stable/
Thanks!
Thanks for the report. I'll take a look when we get to the weekend. For now just some quick/non-final answers:
- I'll take a look at 1. It will be interesting to see if I can recreate the issue. Timing issues are tough that way.
- My software philosophy bends towards minimalism. The fewer lines I write, the less chance for defects. I also prefer few to no dependencies because I don't want to create a source of maintenance that is outside my control. That said, I've always felt that I didn't do async quite right with farc and I've wanted to either rewrite for single-thread concurrency or go all-in on async now that Python has better tools for it. Or both.
- I wouldn't create a dependency just to solve Ctrl+C.
I was easily able to recreate the issue with examples/dpp.py on Mac OS X with Python 3.11.5.