Skip to content

Commit 76fe60f

Browse files
authored
Fix observable sample code (#246)
Fixes #210.
1 parent 7640595 commit 76fe60f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/usage-observables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { spawn, Thread, Worker } from "threads"
2121

2222
const counter = await spawn(new Worker("./workers/counter"))
2323

24-
counter.subscribe(newCount => console.log(`Counter incremented to:`, newCount))
24+
counter().subscribe(newCount => console.log(`Counter incremented to:`, newCount))
2525
```
2626

2727
```js

0 commit comments

Comments
 (0)