Skip to content

Drain pending provider updates on normal context exit - #448

Merged
davidbrochart merged 2 commits into
y-crdt:mainfrom
davidbrochart:provider-flush
Oct 19, 2026
Merged

davidbrochart merged 2 commits into
y-crdt:mainfrom
davidbrochart:provider-flush

Conversation

@davidbrochart

Copy link
Copy Markdown
Collaborator

@davidbrochart
davidbrochart merged commit 03f4cb9 into y-crdt:main Oct 19, 2026
25 checks passed
@davidbrochart
davidbrochart deleted the provider-flush branch October 19, 2026 16:28
Comment thread python/pycrdt/_stream.py
Comment on lines +30 to +31
original_clone = stream.clone
stream.clone = lambda: _with_unsubscribe(original_clone(), unsubscribe) # type: ignore[method-assign]

@armanckeser armanckeser Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this implementation causes a memory "leak" because the clone does not use a weakref.

  • stream.clone = partial(_clone, ref(stream), unsubscribe)

might want to switch to something like this @davidbrochart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants