Skip to content

xt2357/co

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

co

A toy coroutine lib for C++

/*
 * yield to another coroutine  
 * fail if target coroutine is not in Suspend state   
 * or there exists an exception being handled in current coroutine's context
 * (which means the yield_to statement is in a catch block)
*/
bool co::yield_to(co::Routine &other);

Improtant!!!

Client code should never absorbing co::ForceUnwindingException otherwise it will cause incomplete stack unwinding

About

A toy coroutine lib for C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published