Closed lxycomeon closed 1 year ago
Yes, if you set socket_timeout larger than 0 milliseconds.
Regards
Some interfaces only return future. Is there any way to support callback function processing?
Thanks
You can use the generic interface to send async command with callback:
async_redis.command<long long>("incr", "number",
[](Future<long long> &&fut) {
try {
cout << fut.get() << endl;
} catch (const Error &e) {
// handle error
}
});
Also, you're always welcome to create pull requests to add built-in support for these commands :)
Regards
Since there's no update, I'll close this issue.
If you still have problem, feel free to reopen it. If redis-plus-plus is helpful, feel free to star it :)
Regards
Whether the call of any synchronous blocking interface will not exceed the socket_timeout?
Thanks