mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
more work
This commit is contained in:
parent
388cda592f
commit
7e0b63a62b
@ -495,9 +495,13 @@ namespace detail
|
|||||||
{
|
{
|
||||||
return [=](_ATy&&... args)
|
return [=](_ATy&&... args)
|
||||||
{
|
{
|
||||||
|
// Fake continuable which wraps all continuables together
|
||||||
|
return make_continuable([](Callback<Args...>&& callback)
|
||||||
|
{
|
||||||
|
|
||||||
// Fake continuable
|
|
||||||
return continuable_t();
|
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
4
test.cpp
4
test.cpp
@ -46,11 +46,11 @@ Continuable<ResultSet> AsyncQuery(std::string const& query)
|
|||||||
{
|
{
|
||||||
return make_continuable([=](Callback<ResultSet>&& callback)
|
return make_continuable([=](Callback<ResultSet>&& callback)
|
||||||
{
|
{
|
||||||
|
std::cout << query << std::endl;
|
||||||
callback(ResultSet(2));
|
callback(ResultSet(2));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Original method taking an optional callback.
|
// Original method taking an optional callback.
|
||||||
void CastSpell(int id, Optional<Callback<SpellCastResult>> const& callback = boost::none)
|
void CastSpell(int id, Optional<Callback<SpellCastResult>> const& callback = boost::none)
|
||||||
{
|
{
|
||||||
@ -372,6 +372,8 @@ int main(int /*argc*/, char** /*argv*/)
|
|||||||
>
|
>
|
||||||
>::result_maker::partial_results_t myres123345;
|
>::result_maker::partial_results_t myres123345;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
auto firstType = detail::multiple_when_all_chainer_t<
|
auto firstType = detail::multiple_when_all_chainer_t<
|
||||||
fu::identity<>,
|
fu::identity<>,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user