Skip to content

Commit

Permalink
fix: Cannot cancel timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasdao committed Mar 23, 2020
1 parent 921397d commit 3b67081
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ npm i core-async

# APIs
## Channel

The Channel object supports three different signatures:
- `new Channel(<Int> buffer, <Object> options)`
- `new Channel(<Int> buffer, <Func> transducer, <Object> options)`
- `new Channel(<Func> transducer, <Object> options)`

### Buffered vs Unbuffered Channels

```js
Expand Down
2 changes: 1 addition & 1 deletion src/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const timeout = time => {
}

const d = delay(t)
const out = new Channel(null, null, { onClosing:d.cancel })
const out = new Channel(null, { onClosing:d.cancel })
d.then(() => out.put('timeout'))
return out
}
Expand Down

0 comments on commit 3b67081

Please sign in to comment.