-
Notifications
You must be signed in to change notification settings - Fork 717
Closed
Description
In cpp side, I come up with following ways:
std: C++11 providesstd::asyncandstd::future, C++20 providescoroutine. We can expose API compatible with the standard library. Cons: Maybe we need to limit cpp version to at least c++20.asio: We have usedBoostas a dependency. So we can integrate asio runtime to expose our async API. This is the most common way and does not require importing more dependencies.- Other async library: There is other popular async library, e.x.
libevent,libuv. - Custom async runtime: We can expose a small async runtime similar to
tokio, likehyperC API. This provides maximum flexibility and performance.
Solutions of some popular cloud sdk:
Gcpusestd, but havn't completed until now.AWSandAzureuse custom async runtime.
I prefer to use std, because it provides more flexibility than asio。And compared with custom runtime, std is easier to use and less expensive to learn.
I plan to make async operations as an option and default to on. If users can't accept high version, they can just use c++11 with our sync API.
About rust side, cxx's native async support is still on the way. It plans to support std. Currently, it recommends to use synchronous channel to expose async operation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels