Skip to content

Apply subscription changes after publication snapshots - #37

Merged
Seramis merged 1 commit into
mainfrom
publication-subscription-snapshots
Nov 23, 2026
Merged

Seramis merged 1 commit into
mainfrom
publication-subscription-snapshots

Conversation

@Seramis

@Seramis Seramis commented Nov 23, 2026

Copy link
Copy Markdown
Member

Description

Replaces reader/writer-lock-based subscription handling with immutable publication snapshots.

Each publication now captures the live subscriber list before dispatch begins. Subscriptions or unsubscriptions made during an active publication are applied to the next publication rather than affecting the current snapshot.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Other (please specify):

Checklist

  • The PR is submitted to the correct branch (main).
  • My code follows the project's coding style. (.editorconfig)
  • I have commented my code, particularly in hard-to-understand areas and public interfaces.
  • I have added or updated tests for the changes I made.
  • All new and existing tests passed.
  • I have updated the documentation where applicable.

Testing Instructions

  1. Run dotnet test src/WeakEvent.sln --no-restore.
  2. Verify that all 31 tests pass.
  3. Confirm that the test SubscriptionChanges_DuringPublication_AreAppliedToNextPublication passes.

@Seramis Seramis self-assigned this Nov 23, 2026
@Seramis Seramis added the bug Something isn't working label Nov 23, 2026
Comment thread src/WeakEvent/WeakEventCore.cs Dismissed
@Seramis
Seramis merged commit 6299b05 into main Nov 23, 2026
3 checks passed
@Seramis
Seramis deleted the publication-subscription-snapshots branch November 23, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants