Skip to content

Commit 29c37d8

Browse files
final tweaks
1 parent 906519e commit 29c37d8

18 files changed

Lines changed: 171 additions & 1600 deletions

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# wait-in-parallel
22

3-
![travis](https://img.shields.io/travis/lifegadget/wait-in-parallel.svg) ![coveralls](https://coveralls.io/repos/github/lifegadget/wait-in-parallel/badge.svg?branch=master) [![codecov](https://codecov.io/gh/lifegadget/wait-in-parallel/branch/master/graph/badge.svg)](https://codecov.io/gh/lifegadget/wait-in-parallel) ![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)
3+
![travis](https://img.shields.io/travis/lifegadget/wait-in-parallel.svg) [![coveralls](https://coveralls.io/repos/github/lifegadget/wait-in-parallel/badge.svg?branch=master)](https://coveralls.io/github/lifegadget/wait-in-parallel) [![codecov](https://codecov.io/gh/lifegadget/wait-in-parallel/branch/master/graph/badge.svg)](https://codecov.io/gh/lifegadget/wait-in-parallel) ![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)
44

55
For Javascript developers who have accepted `async/await` and **TypeScript** into our hearts, our lives have gotten _so much better_ but there are still some edge cases where you need to be more careful with asynchronous behavior or just where you'd like to have a concise way of expressing parallel execution that's easy to grok.
66

@@ -16,14 +16,14 @@ await Promise.all([anotherThing1, anotherThing2]);
1616
What about the looping trap? Eh, what trap? I gave it a name to make it sound more formal and scary. Basically what I mean is when you are looping around anything and one of the steps within the loop is _asynchronous_:
1717

1818
```js
19-
things.maps(async thing => await process(thing));
19+
things.maps(async thing => await doSomething(thing));
2020
doSomethingElse();
2121
```
2222

2323
Without really intending to i've fired off a set of parallel executions and then immediately executed `doSomethingElse`. Probably not what you wanted. What if I could instead:
2424

2525
```js
26-
things.maps(thing => inParallel.add(process(thing)));
26+
things.maps(thing => inParallel.add(doSomething(thing)));
2727
await inParallel.isDone();
2828
doSomethingElse();
2929
```

coverage/ParallelError.ts.html

Lines changed: 0 additions & 198 deletions
This file was deleted.

coverage/Timeout.ts.html

Lines changed: 0 additions & 141 deletions
This file was deleted.

0 commit comments

Comments
 (0)