hnes / libaco

A blazing fast and lightweight C asymmetric coroutine library 💎 ⛅🚀⛅🌞
https://libaco.org
Apache License 2.0
3.49k stars 392 forks source link

Improvement: support a common entry for every non-main coroutine #30

Open Light-of-Hers opened 4 years ago

Light-of-Hers commented 4 years ago
void common_entry() {
  call_fp() // call current coroutine's aco_cofuncp
  aco_exit()
}

Then the cofuncp can return like a normal function without calling aco_exit