doc: improve AsyncLocalStorage sample
Improves sample snippet in AsyncLocalStorage
doc section. Recently I've heard the following complains from one of early adopters of the API:
- Current snippet can't be run as is (because of the non-existing
someAsyncOperation
function) - Current snippet logs only in on-error case and, in general, could be improved to show a solution for a real-world problem
The update tries to address the above items.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines