mirror of
https://github.com/Naios/continuable.git
synced 2026-02-15 22:59:49 +08:00
Changing promisify::from_asio to promisify::from
This commit is contained in:
parent
d7c305ad33
commit
4665dc931b
@ -61,7 +61,7 @@ struct functional_io_service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto async_resolve(std::string host, std::string service) {
|
auto async_resolve(std::string host, std::string service) {
|
||||||
return cti::promisify<asio::ip::udp::resolver::iterator>::from_asio(
|
return cti::promisify<asio::ip::udp::resolver::iterator>::from(
|
||||||
[&](auto&&... args) {
|
[&](auto&&... args) {
|
||||||
resolver_.async_resolve(std::forward<decltype(args)>(args)...);
|
resolver_.async_resolve(std::forward<decltype(args)>(args)...);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -44,10 +44,10 @@
|
|||||||
namespace cti {
|
namespace cti {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
namespace convert {
|
namespace convert {
|
||||||
/// A helper class for promisifying asio style callback taking functions
|
/// A helper class for promisifying asio and js style callback
|
||||||
/// into a continuable.
|
/// taking functions into a continuable.
|
||||||
template <typename P>
|
template <typename P>
|
||||||
struct promisify_asio {
|
struct promisify_default {
|
||||||
P promise;
|
P promise;
|
||||||
|
|
||||||
template <typename E, typename... T>
|
template <typename E, typename... T>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user