Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make names of Sender<> and Receiver<> variables more coherent #29679

Open
mrobinson opened this issue Apr 28, 2023 · 2 comments
Open

Make names of Sender<> and Receiver<> variables more coherent #29679

mrobinson opened this issue Apr 28, 2023 · 2 comments

Comments

@mrobinson
Copy link
Member

Sometimes these variables are called port, sometimes ipc, sometimes they have the name of the thread on the other end and sometimes not. My proposal is that we standardize on an obvious name for all of them:

  • layout_sender ← Always sends to the layout thread
  • layout_receiver ← Always receives from the layout thread
  • script_sender ← Always sends to the script thread
  • script_receiver ← Always receives from the script thread
  • constellation_sender ← Always sends to the constellation
  • constellation_receiver ← Always receives from the constellation thread
  • etc
@mrobinson mrobinson changed the title Make names of Sender<> and Receiver<>` variables more coherent Make names of Sender<> and Receiver<> variables more coherent Apr 28, 2023
@atbrakhi atbrakhi self-assigned this May 1, 2023
bors-servo added a commit that referenced this issue May 8, 2023
… r=mrobinson

Make names of Sender<> and Receiver<> variables more coherent

<!-- Please describe your changes on the following line: -->
Sometimes these variables are called port, sometimes ipc, sometimes they have the name of the thread on the other end and sometimes not.  This PR tries to standardize on an obvious name for all of them:

Common pattern to note in this PR:
- If it is a `IpcSender`, then naming is followed by `ipc_sender`, such as:  `bluetooth_ipc_sender`,  `canvas_ipc_sender` etc..
- If variable is `crossbeam_channel` sender/receiver then naming is followed by `sender`/`receiver` such as:  `devtools_sender`, `canvas_sender` etc...

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix [#29679](#29679)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@atbrakhi
Copy link
Member

atbrakhi commented May 8, 2023

Fixed in #29710

@atbrakhi atbrakhi closed this as completed May 8, 2023
@mrobinson mrobinson reopened this May 16, 2023
@mrobinson
Copy link
Member Author

I believe there are probably more places in the code where we can make these changes, so I'll reopen this issue.

@atbrakhi atbrakhi removed their assignment Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants