Skip to content

Conversation

@KaustubhOG
Copy link

Closes #2268

Fixes ownership issue in send_tx where the Queue struct was moved
into the first thread closure, preventing the second thread from accessing it.

Changes:

  • Destructured Queue into first_half and second_half
  • Cloned mpsc::Sender so both threads can send messages concurrently

All tests pass locally:

rustc --test exercises/20_threads/threads3.rs && ./threads3

=> test result: ok. 1 passed; 0 failed

@KaustubhOG
Copy link
Author

Hi!

All checks have passed, there are no merge conflicts, and the PR fully addresses the linked issue.
Whenever you have a moment, @rust-lang/rustlings-maintainers, could you please review this?

Happy to make any updates or adjustments if needed. Thanks for your time and work on Rustlings! 🙌

@mo8it
Copy link
Contributor

mo8it commented Nov 17, 2025

See #2268 (comment)

@mo8it mo8it closed this Nov 17, 2025
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.

thread3.rs don't compile manually

2 participants