massalabs / massalabs/PeerNet

Shutdown Peer thread from the parent

Open
#28 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Issue when tackling #14 (see PR #26 )

A thread created to manage a Peer (in `new_peer`) doesn't have a clean way to exit.

As a temporary measure, a `Sender<()>` has been passed to all new threads, and as they listen to it at the same time as the receiver on the high/low priority channels, they can exit the thread.

This requires to be implemented in a cleaner way

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading issue #14 and PR #26, then inspect the thread created in `new_peer` and how it receives the high- and low-priority channels. Replace the temporary `Sender<()>` shutdown approach with a cleaner parent-controlled exit mechanism, and verify that the peer thread can shut down cleanly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.