Closed fantasy-peak closed 2 years ago
@fantasy-peak After some research on coroutine, I reviewed this PR. It looks like this is a generic future awaiter, which can be used to co_await
any future type. Correct me if I'm wrong, since I'm still not quite familiar with coroutine.
If it is a generic future awaiter, I'm not sure if it's a good idea to add it to the library. Because it should be a generic facility for coroutine, not a specific one for redis-plus-plus.
Also, I'm not sure, if we can achieve something like the following:
CoRedis co_redis("tcp:://127.0.0.1");
optional<string> val = co_await co_redis.get("key");
If you have any idea on it, feel free to let me know :)
Sorry for the late reply, too busy these days.
Regards
@fantasy-peak After some research on coroutine, I reviewed this PR. It looks like this is a generic future awaiter, which can be used to
co_await
any future type. Correct me if I'm wrong, since I'm still not quite familiar with coroutine.If it is a generic future awaiter, I'm not sure if it's a good idea to add it to the library. Because it should be a generic facility for coroutine, not a specific one for redis-plus-plus.
Also, I'm not sure, if we can achieve something like the following:
CoRedis co_redis("tcp:://127.0.0.1"); optional<string> val = co_await co_redis.get("key");
If you have any idea on it, feel free to let me know :)
Sorry for the late reply, too busy these days.
Regards
I'm very sorry for the late reply,Yes, this is a general-purpose awaiter for future, If there is CoRedis, I think it is excellent, But there will be a lot of work, We must wrap the asynchronous interface now,I also don't think it's a good idea to add it to the library, But at present , it is a temporary solution(redis-plus-plus use coroutine)