This commit is contained in:
aozhiwei 2023-05-16 22:44:48 +08:00
parent c8f08c2975
commit 99cae679b9

View File

@ -5,19 +5,11 @@
Coroutine::Coroutine(std::function<void(Coroutine*)> cb)
{
cb_ = cb;
#if 0
source_ = std::make_shared<boost::coroutines2::coroutine<void>::pull_type>
(
[&] (boost::coroutines2::coroutine<void>::pull_type& sink)
[this] (boost::coroutines2::coroutine<void>::push_type& sink)
{
});
#endif
boost::coroutines2::coroutine<void>::pull_type source
(
[&] (boost::coroutines2::coroutine<void>::push_type& sink)
{
cb_(this);
});
}