CabbageDevelopment / qasync

Python library for using asyncio in Qt-based applications.
BSD 2-Clause "Simplified" License
307 stars 43 forks source link

Improve examples and README #102

Closed temeddix closed 7 months ago

temeddix commented 7 months ago

This PR improves the example from various aspects.

And of course, I confirmed that this code works properly.

temeddix commented 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?

hosaka commented 7 months ago

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.

hosaka commented 7 months ago

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

temeddix commented 7 months ago

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 :)

hosaka commented 7 months ago

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 :)