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.
Better IP management
This PR introduces several improvements to the information packet (IP) management in Dagrs:
New Features
InChannels
Added
recv_anymethod to receive data from any available channel without specifying the sender's ID, which returns a tuple of(sender_id, content)to identify the message source.OutChannels
Added
get_receiver_idsmethod to query available receiver nodes.Example
recv_any_example.rsdemonstrates how to use therecv_anymethod ofInChannelsto receive data from any available channel.This example creates a graph with two senders and one receiver:
recv_anyto receive messages from either senderSo when the receiver calls the "recv_any" method, it will always receive messages from the normal sender, or to be more precise, most of the time. And the second time the receiver calls the "recv_any" method, it will receive messages from the slow sender.
Related Issue
#106 #104