Skip to content

Added ARM64 CPU architecture support#2

Merged
Kiryuumaru merged 3 commits into
prereleasefrom
feat/added-arm64-support
Jul 6, 2024
Merged

Added ARM64 CPU architecture support#2
Kiryuumaru merged 3 commits into
prereleasefrom
feat/added-arm64-support

Conversation

@Kiryuumaru
Copy link
Copy Markdown
Owner

No description provided.

@Kiryuumaru Kiryuumaru enabled auto-merge (squash) July 6, 2024 18:11
@Kiryuumaru Kiryuumaru disabled auto-merge July 6, 2024 18:12
@Kiryuumaru Kiryuumaru enabled auto-merge (squash) July 6, 2024 18:13
@Kiryuumaru Kiryuumaru disabled auto-merge July 6, 2024 18:13
@Kiryuumaru Kiryuumaru enabled auto-merge (squash) July 6, 2024 18:15
@Kiryuumaru Kiryuumaru merged commit dd892f0 into prerelease Jul 6, 2024
@Kiryuumaru Kiryuumaru deleted the feat/added-arm64-support branch July 6, 2024 18:19
Kiryuumaru added a commit that referenced this pull request May 13, 2026
Kiryuumaru added a commit that referenced this pull request May 20, 2026
…s synchronous

Closes Residual #2 from the architect review: the overlap check runs when the method is invoked, not lazily on first MoveNextAsync. Callers must wrap the method call itself (or the GetAsyncEnumerator call) in try/catch — not the await foreach body — to observe ChannelExists. Documentation-only change; no behavior impact.
Kiryuumaru added a commit that referenced this pull request May 20, 2026
* feat(core): prefix-filtered AcceptChannelsAsync overload

Replace AcceptChannelsAsync(CancellationToken) with a single unified
signature: AcceptChannelsAsync(string? channelIdPrefix = null, CancellationToken ct = default).

When channelIdPrefix is null (default), behaves as before: yields every
inbound channel not claimed by a specific AcceptChannel call.

When channelIdPrefix is supplied, only channels whose ID starts with it
are yielded; matched channels are routed exclusively to that enumeration
and are NOT yielded by the unfiltered (null prefix) overload. This lets
an overlay protocol (e.g. mesh routing) share a multiplexer with the
host application by subscribing to a reserved prefix.

ChannelRegistry tracks prefix subscriptions and routes inbound channels
in EnqueueForAccept by: exact-id pending accept -> prefix subscription -> default queue.

Breaking change: all callsites that passed CancellationToken positionally
must now use named argument syntax (ct: token). Per project policy
(unreleased), backward compatibility is not maintained.

* fix(registry): prefix subscription lifetime + overlap rejection

Three architectural fixes on the prefix-routing path introduced by this PR:

C3 - Subscription cleanup on cancellation. Previously a cancelled AcceptChannelsAsync(prefix, ct) left its PrefixSubscription in the dispatch list forever; matching channels were silently queued into an abandoned, reader-less channel (memory leak + silent host-side channel drop). Now the iterator wraps enumeration in try/finally that removes the subscription from the dispatch list, completes its queue writer, and re-routes any still-buffered channels back into the unfiltered _acceptQueue so the host application can observe them.

C4 - Prefix overlap rejection. Previously two subscriptions whose prefixes were a prefix of one another had implicit, undocumented first-registration-wins routing. AcceptChannelsAsync now throws MultiplexerException(ChannelExists) at registration time when a candidate prefix is a prefix of, or has as a prefix, any existing subscription (covers equality and both directions of containment). Policy is documented in IStreamMultiplexer xmldoc.

C5 - Stale TCS cleanup in ChannelRegistry.AcceptChannelAsync. Defensive: the ct.Register callback now removes the entry from _pendingAccepts before cancelling the TCS, preventing a future EnqueueForAccept from routing into a permanently-cancelled TCS.

Regression tests in tests/NetConduit.UnitTests/PrefixSubscriptionTests.cs:

- PrefixSubscription_RoutesMatchingChannels_AwayFromDefaultStream

- PrefixSubscription_DuplicatePrefix_ThrowsChannelExists

- PrefixSubscription_OverlappingPrefix_ThrowsChannelExists

- PrefixSubscription_CancellationFreesPrefix_AllowsResubscribe

- PrefixSubscription_CancellationReRoutesBufferedChannels_ToDefaultStream

Full NetConduit.UnitTests suite: 355 passed / 0 failed / 1 pre-existing skip.

* docs(IStreamMultiplexer): clarify AcceptChannelsAsync overlap check is synchronous

Closes Residual #2 from the architect review: the overlap check runs when the method is invoked, not lazily on first MoveNextAsync. Callers must wrap the method call itself (or the GetAsyncEnumerator call) in try/catch — not the await foreach body — to observe ChannelExists. Documentation-only change; no behavior impact.
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.

1 participant