Draft
Conversation
The old imp.rs blocked Ready→Paused inside RUNTIME.block_on and tokio-spawned tasks pushed buffers straight from the runtime. The new imp.rs spins a SessionManager + control channel so state changes stay non-blocking and all control messages flow through a GLib main-context forwarder. Pad creation now hands out PadEndpoints backed by mpsc queues and a shared spawn_main_context_forwarder, ensuring every buffer/event is dispatched from the element thread instead of the Tokio worker that read it. Teardown code keeps the JoinHandles for control/pad tasks and aborts them during Paused→Ready preventing dangling background loops. Adds a small helper + unit test (forwarder_delivers_messages_in_order) to prove the new channel bridge delivers messages sequentially
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace legacy
MoqSrcwith bridged async implementationReplaces the old
MoqSrc(src/source/imp.rs) with a non-blocking async bridge design.Key changes
RUNTIME.block_onduringReady → PausedSessionManager+ control channelJoinHandles duringPaused → Readyto prevent dangling tasksforwarder_delivers_messages_in_orderunit test to verify ordered delivery across the async bridgeResult
src/sink: TODO
Testing
TODO