QAsync
@qasync
QAsync is a new way to write asynchronous Qt applications. Single thread, multiple simultaneous asynchronous tasks.
Just make sure that everybody has found it... The source code is available here: gitorious.org/~hhedberg/qt/q…
Our white paper explains the motivation behind the solution and the actual implementation: qasync.henrikhedberg.com/whitepaper
The source code is actually pushed out already. Who is the first to find it?
We took one week off, but we are almost ready to share our solution with you now. It will happen within few days!
All asynchronous functions end up calling QAsync::waitAsync(), which gives control back to the Qt's event loop until the task has completed.
In the core of our solution is a new class: QAsync. It provides means to suspend a function until an asynchronous task has completed.
@kypeli It is an alternative way to express functionality. With QAsync, there no need to split asynchronous code into separate slots.
What is QAsync? It is a new way to write asynchronous Qt applications. Single thread with multiple simultaneous asynchronous tasks.
This week we will go deeper into internals of our solution. We will also focus on finalizing the release, so there will be less tweeting.
The catch in our Node example is closure. The execution context may be easily shared between "slots" when practical. pastebin.com/jFh8Ea9G
We like to learn and get inspired from other languages and frameworks. Now the TCP server is implemented using Node. pastebin.com/jFh8Ea9G
@qasync Is the solution to generate some code at compile-time (like moc does) or is there run-time tricks (or both)?
Actually, our solution is based on signals and slots. We will introduce an alternative way how those can be used. #Qt
Do we hate signals? No, absolute not! We love signals, the best thing since sliced bread. We just think that choices are needed sometimes.
Here is another working example. This time it is a client-side utility function to fetch data addressed by an URL. pastebin.com/ULXhk1fL
@qasync I think that you should open this solution to community :) will it be part of qt5?
Finally! Here is the working version of the original #Qt code. Just a word with five letters added. What do you think? pastebin.com/1WqE7321
United States 趨勢
- 1. #Hardrockbet 2,038 posts
- 2. #ElClasico 55.9K posts
- 3. Go Birds 3,582 posts
- 4. #AskFFT N/A
- 5. Mbappe 71.2K posts
- 6. Good Sunday 70.6K posts
- 7. Mooney 2,383 posts
- 8. Go Bills 4,430 posts
- 9. Drake London 1,445 posts
- 10. Barca 110K posts
- 11. #sundayvibes 6,401 posts
- 12. Barcelona 178K posts
- 13. Real Madrid 179K posts
- 14. Vini 21.2K posts
- 15. Scott Bessent 14.6K posts
- 16. #ARSCRY 4,844 posts
- 17. Kincaid 1,561 posts
- 18. Full PPR N/A
- 19. Tez Johnson N/A
- 20. Lamine 93.9K posts
Something went wrong.
Something went wrong.