Skip to content

Conversation

@pzhan9
Copy link
Contributor

@pzhan9 pzhan9 commented Nov 13, 2025

Summary:
Two changes:

  • Close NetTx's mspc::Receiver before returning the message. Otherwise, we might get stuck on this loop if there is another thread actively writing to this NetTx:

https://www.internalfb.com/code/fbsource/[5ee448cb323e2539ea2cf169644b7d829d715040]/fbcode/monarch/hyperactor/src/channel/net/client.rs?lines=586-590

New messages are still returned after mspc::Receiver is closed:

https://www.internalfb.com/code/fbsource/[5ee448cb323e2539ea2cf169644b7d829d715040]/fbcode/monarch/hyperactor/src/channel/net.rs?lines=156-161

  • Remove the log when the return_channel is closed. This log does not seem to be helpful, and also we do not log it in other places for closed return_channel.

Differential Revision: D87002126

Summary:
Two changes:

* Close NetTx's `mspc::Receiver` before returning the message. Otherwise, we might get stuck on this loop if there is another thread actively writing to this NetTx:

https://www.internalfb.com/code/fbsource/[5ee448cb323e2539ea2cf169644b7d829d715040]/fbcode/monarch/hyperactor/src/channel/net/client.rs?lines=586-590

New messages are still returned after `mspc::Receiver` is closed:

https://www.internalfb.com/code/fbsource/[5ee448cb323e2539ea2cf169644b7d829d715040]/fbcode/monarch/hyperactor/src/channel/net.rs?lines=156-161
 
* Remove the log when the return_channel is closed. This log does not seem to be helpful, and also we do not log it in other places for closed `return_channel`.

Differential Revision: D87002126
@meta-codesync
Copy link

meta-codesync bot commented Nov 13, 2025

@pzhan9 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87002126.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 13, 2025
@meta-codesync meta-codesync bot closed this in adcdb8e Nov 14, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 14, 2025

This pull request has been merged in adcdb8e.

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

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants