Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
Description
Callback-based (bulk or async) API cannot rely on C++ references, because it is executed asynchronously.
We might want to allow the pointer to attempt object to survive the logic lambda, so that the following code will be possible
txn.run([](auto attempt) {
|
attempt.get([attempt] (auto ctx, auto res) {
|
if(ctx.ec()) {
|
// handle error
|
} else {
|
attempt.replace(...)
|
}
|
});
|
});
|
|