Skip to content

ratiotile/coroutine-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Coroutines in MSVC 2015

[n4134] - Resumable Functions rev2 was implemented in VS2015 Update 21

It appears that Visual Studio 2015 Update 3 actually implements http://open-std.org/JTC1/SC22/WG21/docs/papers/2015/p0057r0.pdf

an awaitable type needs to define 3 member functions.

await_ready() is called when co_await is used on an awaitable. It returns false to suspend, otherwise it needs to have a value ready.

await_suspend() is called when await_ready() returns false, right before the function is suspended.

await_resume() is called right before this function is resumed.

The coroutine promise is looked up under the resumable function type R::promise_type A resumable function must specify coroutine promise, which has:

Coroutines must be of type resumable function:


  1. https://github.com/kirkshoop/await

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published