Skip to content

Commit e7ef1f3

Browse files
panaaliCylix
authored andcommitted
fixing .README errors (Cylix#175)
.commit() is for async calls. sub.sync_commit() doesn't exist on the latest version.
1 parent df6ae98 commit e7ef1f3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ client.get("hello", [](cpp_redis::reply& reply) {
2525
//! std::future<cpp_redis::reply> get_reply = client.get("hello");
2626

2727
client.sync_commit();
28-
//! or client.commit(); for synchronous call
28+
//! or client.commit(); for asynchronous call
2929
```
3030
`cpp_redis::client` [full documentation](https://github.com/Cylix/cpp_redis/wiki/Redis-Client) and [detailed example](https://github.com/Cylix/cpp_redis/wiki/Examples#redis-client).
3131
More about [cpp_redis::reply](https://github.com/Cylix/cpp_redis/wiki/Replies).
@@ -43,8 +43,8 @@ sub.psubscribe("*", [](const std::string& chan, const std::string& msg) {
4343
std::cout << "PMESSAGE " << chan << ": " << msg << std::endl;
4444
});
4545

46-
sub.sync_commit();
47-
//! or sub.commit(); for synchronous call
46+
sub.commit();
47+
4848
```
4949
`cpp_redis::subscriber` [full documentation](https://github.com/Cylix/cpp_redis/wiki/Redis-Subscriber) and [detailed example](https://github.com/Cylix/cpp_redis/wiki/Examples#redis-subscriber).
5050

0 commit comments

Comments
 (0)