@@ -1114,8 +1114,9 @@ added:
|
1114 | 1114 | * `...args` {any} |
1115 | 1115 | |
1116 | 1116 | Runs a function synchronously within a context and returns its |
1117 | | -return value. The store is not accessible outside of the callback function or |
1118 | | -the asynchronous operations created within the callback. |
| 1117 | +return value. The store is not accessible outside of the callback function. |
| 1118 | +The store is accessible to any asynchronous operations created within the |
| 1119 | +callback. |
1119 | 1120 | |
1120 | 1121 | The optional `args` are passed to the callback function. |
1121 | 1122 | |
@@ -1129,6 +1130,9 @@ const store = { id: 2 };
|
1129 | 1130 | try { |
1130 | 1131 | asyncLocalStorage.run(store, () => { |
1131 | 1132 | asyncLocalStorage.getStore(); // Returns the store object |
| 1133 | +setTimeout(() => { |
| 1134 | +asyncLocalStorage.getStore(); // Returns the store object |
| 1135 | + }, 200); |
1132 | 1136 | throw new Error(); |
1133 | 1137 | }); |
1134 | 1138 | } catch (e) { |
|