Closed temeddix closed 7 months ago
Hi @hosaka , I improved examples, README and things that you have mentioned in #96.
Could you review this PR and merge it if it's okay, before publishing the new version?
Yeah I'm working on it. I have a QML example that I've been meaning to add as well, so I'll update this PR when I put it together.
I've removed a sentence from the readme about GIL and irrelevant Flutter, JavaScript part. I'm assuming that people who want to use qasync have some basic understanding of what async/coroutines are. Let me know if you're happy with the current state of this PR @temeddix
It looks great! I only have one question.
Wouldn't this sentence help people get confident about choosing async over threads? Because for beginners, 'thread' might sound faster than 'async', though it actually isn't.
Single-threaded concurrency does not inherently make the app slower, but only safer, because of Python's GIL.
But I am happy with the current status as well :)
While that sentence does sound encouraging, the readme should describe what the project is and how it should be used to it's full potential, rather than explain abstract concepts :)
This PR improves the example from various aspects.
aiohttp.ClientSession()
error saying that it should be run in an async function.PySide6
andPyQt6
.asyncio.Event
instead ofCancelledError
exception to close the app gracefully.PySide6.QApplication
. This is important because this class allows various font, theme, behavior setup. WithQApplication.instance
, app customization is not possible.And of course, I confirmed that this code works properly.