QAsync
@qasync
QAsync is a new way to write asynchronous Qt applications. Single thread, multiple simultaneous asynchronous tasks.
Bạn có thể thích
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 Xu hướng
- 1. #WWERaw 34K posts
 - 2. Cowboys 41.3K posts
 - 3. Koa Peat 3,131 posts
 - 4. Logan Paul 5,604 posts
 - 5. Bland 8,281 posts
 - 6. Cardinals 20K posts
 - 7. Sam Williams 1,047 posts
 - 8. Cuomo 134K posts
 - 9. Monday Night Football 13.2K posts
 - 10. Jerry 36.7K posts
 - 11. Marvin Harrison Jr 3,654 posts
 - 12. Arizona 34.9K posts
 - 13. Jacoby Brissett 1,532 posts
 - 14. #RawOnNetflix 1,277 posts
 - 15. Jake Ferguson 1,370 posts
 - 16. Rey Mysterio 3,183 posts
 - 17. Kyler Murray 1,536 posts
 - 18. Turpin N/A
 - 19. Ben Kindel N/A
 - 20. #AZvsDAL 2,081 posts
 
Something went wrong.
Something went wrong.