This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is there any plans or work going on gcc related to c++ coroutines?


On 2017-08-15 11:14 +0300, Ignas Brašiškis wrote:
> Hello I had seen some work in both msvc and clang related to
> coroutines. I tried searching about what is the status of that
> (pre-)experimental feature in GCC and managed only find a some
> diagnostic patch. I got curious is there is any work related on gcc
> yet?

Coroutine is not a C/C++ language feature.  But of course you can
implement your own coroutine library with GCC, and some system level
hacking like setjmp or setcontext.  For example
<https://github.com/Tencent/libco>.

I don't think it's the C/C++ compilers' duty to support coroutine.
If you want a language with built-in coroutines, maybe you should use
Go.
-- 
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]