Skip to content

Commit 7ed02d5

Browse files
committed
refactor: wip comments
1 parent 6157b18 commit 7ed02d5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/utils/src/lib/performance-observer.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ export class PerformanceObserverSink<T> implements Observer, Buffered {
208208
* Creates a Node.js PerformanceObserver that monitors 'mark' and 'measure' entries.
209209
* The observer uses a bounded queue with proactive flushing to manage memory usage.
210210
* When buffered mode is enabled, any existing buffered entries are immediately flushed.
211-
*
212-
* @throws {Error} If the sink is closed before subscription
211+
* If the sink is closed, items stay in the queue until reopened.
213212
*
214213
*/
215214
subscribe(): void {
@@ -260,10 +259,7 @@ export class PerformanceObserverSink<T> implements Observer, Buffered {
260259
* Writes all currently queued encoded performance entries to the configured sink.
261260
* If the sink is closed during flush, the queue is cleared without writing.
262261
* The queue is always cleared after flush attempt, regardless of success or failure.
263-
*
264-
* Note: flush() on a closed sink is a no-op.
265-
*
266-
* @throws {Error} If sink write operations fail (with original error as cause)
262+
* If the sink is closed flush is a no-op and the items stay in the queue until reopened.
267263
*/
268264
flush(): void {
269265
if (this.#queue.length === 0) {

0 commit comments

Comments
 (0)