alibaba / alibaba/async_simple
how to adapt to callback style API
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 316
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
the referenced document says to use
async_xxx(param, callbackhandler)
to
co_await async_xxx(param);
but, that kind of refactoring only works with asio.
we have some old lib that accepts callbacks. now I want to call that old lib function and "co_await" for the callback to be invoked.
hint: I warpped the Executor for the old lib, so the old lib and async_simple runs in the same Executor. I need a way to convert
"lazy<>" to some old style callbacks. and let that callback to resume the calling lazy<>
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files or tests. Start by reading the async_simple lazy<> and Executor APIs, then compare them with the old library's callback contract. Done would require an agreed, tested way to bridge callback completion to a suspended lazy<> coroutine.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100