基于C++ Coroutines提案 ‘Stackless Resumable Functions’编写的协程库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rf_task.cpp 261B

12345678910111213141516171819
  1. #include "librf/librf.h"
  2. namespace librf
  3. {
  4. LIBRF_API task_t::task_t() noexcept
  5. : _stop(nostopstate)
  6. {
  7. }
  8. LIBRF_API task_t::~task_t()
  9. {
  10. }
  11. LIBRF_API const stop_source & task_t::get_stop_source()
  12. {
  13. _stop.make_sure_possible();
  14. return _stop;
  15. }
  16. }