Signed-off-by: Lewis Chan <
bai...@gmail.com>
---
doc/tutorial.md | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/doc/tutorial.md b/doc/tutorial.md
index fdcc922d..a8ca911e 100644
--- a/doc/tutorial.md
+++ b/doc/tutorial.md
@@ -2155,7 +2155,7 @@ From this output, we have no way of knowing that the exception was thrown in `g(
```
#include <util/backtrace.hh>
seastar::future<> g() {
- return seastar::make_exception_future_with_backtrace<>(std::runtime_error("hello"));
+ return seastar::make_exception_future_with_backtrace<void>(std::runtime_error("hello"));
}
```
Now the output looks like
@@ -2376,7 +2376,7 @@ Consider the following asynchronous function `loop()`, which loops until some sh
```cpp
seastar::future<long> loop(int parallelism, bool& stop) {
return seastar::do_with(0L, [parallelism, &stop] (long& counter) {
- return seastar::parallel_for_each(std::views::iota(0u, parallelism),
+ return seastar::parallel_for_each(std::views::iota(0, parallelism),
[&stop, &counter] (unsigned c) {
return seastar::do_until([&stop] { return stop; }, [&counter] {
++counter;
@@ -2497,14 +2497,14 @@ In conjunction with seastar::app_template, initialization and cleanup look like
int main(int argc, char** argv) {
seastar::app_template app;
return app.run(argc, argv, [] {
- return seastar::async() {
+ return seastar::async([] {
std::cout << "Hello world\n";
my_class my_object;
// ... more code
// my_object will be destroyed here
return 0;
- });
+ }));
}
```
@@ -2519,7 +2519,7 @@ use of the seastar::defer() function to schedule an arbitrary cleanup function:
int main(int argc, char** argv) {
seastar::app_template app;
return app.run(argc, argv, [] {
- return seastar::async() {
+ return seastar::async([] {
std::cout << "Hello world\n";
my_class my_object;
// ... more code
@@ -2535,6 +2535,7 @@ int main(int argc, char** argv) {
// my_object will be destroyed here
return 0;
+ })
});
}
```
--
2.43.0