Home » Developing U++ » UppHub » Coroutines package for U++
Re: Coroutines package for U++ [message #59125 is a reply to message #59124] |
Sun, 06 November 2022 21:31 |
Oblivion
Messages: 1135 Registered: August 2007
|
Senior Contributor |
|
|
Hello Klugier,
Quote:Hello Oblvion,
Why you decieded to create separate package in concuret to Core? Is there Co* family functions like CoWork, AsyncWork, CoPartition and CoDo not enough for your needs?
On the contary, I use them daily.
However, It seems that there is a misunderstading here.
C++20 coroutines are not "concurrency" functions. They are not threads. They are suspendable functions, meaning that you can return from the function in the middle of its operation and you can resume it later. This makes async programming without threads impressively easy!
Excerpt:
A coroutine is a function that can suspend execution to be resumed later. Coroutines are stackless: they suspend execution by returning to the caller and the data that is required to resume execution is stored separately from the stack. This allows for sequential code that executes asynchronously (e.g. to handle non-blocking I/O without explicit callbacks), and also supports algorithms on lazy-computed infinite sequences and other uses.
While it is one of the coolest features of C++20, the original design is, well, let's say it isn't very elegant... (no wonder even seasoned developers are having a hard time understanding how to use them - watch the cppcon's ever-increasing videos about them. )
So, I haven't created a "yet another" thread-based concurrency tool, in the traditional sense. I have implemented and made available something completely new to U++. (hence the upload.)
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sun, 06 November 2022 21:56] Report message to a moderator
|
|
|
|
|
Coroutines package for U++
By: Oblivion on Sat, 05 November 2022 12:19
|
|
|
Re: Coroutines package for U++
By: Oblivion on Sun, 06 November 2022 20:20
|
|
|
Re: Coroutines package for U++
By: Klugier on Sun, 06 November 2022 20:44
|
|
|
Re: Coroutines package for U++
By: Oblivion on Sun, 06 November 2022 21:31
|
|
|
Re: Coroutines package for U++
By: Lance on Mon, 07 November 2022 00:14
|
|
|
Re: Coroutines package for U++
By: koldo on Mon, 07 November 2022 08:39
|
|
|
Re: Coroutines package for U++
By: Oblivion on Mon, 07 November 2022 20:07
|
|
|
Re: Coroutines package for U++
By: peterh on Mon, 07 November 2022 20:30
|
|
|
Re: Coroutines package for U++
By: Oblivion on Mon, 07 November 2022 20:31
|
|
|
Re: Coroutines package for U++
By: peterh on Tue, 08 November 2022 09:09
|
|
|
Re: Coroutines package for U++
By: Oblivion on Wed, 09 November 2022 16:22
|
|
|
Re: Coroutines package for U++
By: Oblivion on Wed, 09 November 2022 22:52
|
|
|
Re: Coroutines package for U++
By: Lance on Wed, 09 November 2022 23:26
|
|
|
Re: Coroutines package for U++
By: Lance on Sat, 12 November 2022 00:33
|
|
|
Re: Coroutines package for U++
By: Oblivion on Sat, 12 November 2022 07:22
|
|
|
Re: Coroutines package for U++
By: Lance on Sun, 13 November 2022 05:37
|
|
|
Re: Coroutines package for U++
By: Lance on Mon, 14 November 2022 02:17
|
|
|
Re: Coroutines package for U++
By: Oblivion on Mon, 14 November 2022 05:56
|
|
|
Re: Coroutines package for U++
By: Lance on Mon, 14 November 2022 15:08
|
|
|
Re: Coroutines package for U++
By: peterh on Mon, 07 November 2022 18:38
|
|
|
Re: Coroutines package for U++
By: zsolt on Mon, 12 December 2022 13:48
|
|
|
Re: Coroutines package for U++
By: Oblivion on Mon, 12 December 2022 17:42
|
|
|
Re: Coroutines package for U++
By: zsolt on Mon, 12 December 2022 21:38
|
Goto Forum:
Current Time: Fri Nov 01 00:05:12 CET 2024
Total time taken to generate the page: 0.01277 seconds
|