You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
A proposal for several interfaces that will help with general usage and
4
4
consumption of async iterators in ECMAScript.
5
5
6
-
This proposal was split out from [proposal-iterator-helpers](https://github.com/tc39/proposal-iterator-helpers) to resolve design questions related to parallelism, which are not relevant to sync helpers. Many design questions (including choice of methods) were discussed and decided in that respository, and its readme should be read first.
6
+
This proposal was split out from [proposal-iterator-helpers](https://github.com/tc39/proposal-iterator-helpers) to resolve design questions related to concurrency (see below), which are not relevant to sync helpers. Many design questions (including choice of methods) were discussed and decided in that respository, and its readme should be read first.
7
7
8
8
## Status
9
9
@@ -34,9 +34,9 @@ This proposal contains the following methods:
34
34
35
35
See [proposal-iterator-helpers](https://github.com/tc39/proposal-iterator-helpers) for motivation and additional high-level descriptions for these methods.
36
36
37
-
## Parallelism
37
+
## Concurrency
38
38
39
-
In the iterator-producing methods (`.map`, `.filter`, `.take`, `.drop`, and `.flatMap`), async helpers have the opportunity to support _parallelism_. For example, in the following code:
39
+
In the iterator-producing methods (`.map`, `.filter`, `.take`, `.drop`, and `.flatMap`), async helpers have the opportunity to support _concurrency_. For example, in the following code:
40
40
41
41
```js
42
42
asyncIteratorOfUrls
@@ -48,11 +48,11 @@ await Promise.all([
48
48
])
49
49
```
50
50
51
-
there could be two calls to `fetch` running at once. For this to work, the helpers have to be explicitly designed to support this. The original design of this proposal instead implemented the helpers as essentially async generators, which buffer calls to `.next` rather than allowing multiple calls to have simulaneous effects.
51
+
there could be two calls to `fetch` running at once. For this to work, the helpers have to be explicitly designed to support this. The original design of this proposal instead implemented the helpers as essentially async generators, which buffer calls to `.next` rather than allowing multiple calls to have simultaneous effects.
52
52
53
53
This proposal is being revised to support at least the above use case. The exact details of what that looks like for each helper are not yet decided.
54
54
55
-
###How can I access the new intrinsics?
55
+
## How can I access the new intrinsics?
56
56
57
57
This proposal introduces two new intrisic objects, in addition to the two added in the sync proposal. They can be accessed as follows:
0 commit comments