Skip to content

Commit b989db1

Browse files
committed
📝 Add pipe disposing code to the examples
1 parent 68cd959 commit b989db1

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ pipe.onMessage = (topic, data) => {
122122
* Start rolling!
123123
*/
124124
pipe.start();
125+
126+
/**
127+
* Don't forget to dispose the pipe when it is no longer used.
128+
*/
129+
// pipe.stop();
125130
```
126131

127132
## The Concepts
@@ -650,6 +655,7 @@ NO.
650655
[license-badge]: https://img.shields.io/npm/l/comcat.svg
651656

652657
<!-- Project Links -->
658+
653659
[example-readme]: https://github.com/afterwind-io/comcat/blob/main/example/README.md
654660

655661
<!-- References -->

example/pipe.activetab.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ pipe.onMessage = (topic: string, data: any) => {
1919
};
2020

2121
pipe.start();
22+
23+
/**
24+
* Don't forget to dispose the pipe when it is no longer used.
25+
*/
26+
// pipe.stop();

0 commit comments

Comments
 (0)