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

Implement intrusive mailbox #127

Merged
merged 21 commits into from
Jul 6, 2024
Merged

Implement intrusive mailbox #127

merged 21 commits into from
Jul 6, 2024

Conversation

loyd
Copy link
Collaborator

@loyd loyd commented May 25, 2024

It's better to start the review with mailbox.rs, then message/repr.rs, message/any.rs, and envelope.rs.

Closes #52

@loyd loyd force-pushed the feat/intrusive-mailbox branch from b6d107a to beabaf8 Compare June 18, 2024 06:52
@loyd loyd changed the title Draft: implement intrusive mailbox Implement intrusive mailbox Jun 21, 2024
@loyd loyd requested a review from GoldsteinE June 21, 2024 09:54
@loyd loyd force-pushed the feat/intrusive-mailbox branch from 21cf5bb to e9e3987 Compare June 23, 2024 09:50
///
/// Common safety requirements for all functions:
/// * input pointers (`ptr`) must be [valid] for reading `MessageRepr<M>`.
/// * output pointers (`out_ptr`) must be [valid] for writing `MessageRepr<M>`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Output pointers also should not contain any previous values, given that ptr::write() will discard them without running destructors.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if maybe having a separate type for an “uninit MessageRepr” would make more sense here (so alloc_repr() would return UninitMessageRepr, and e.g. clone() would accept one as out_ptr).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TLDR: It's nice idea, but leads to overcomplicated code

elfo-core/src/exec.rs Outdated Show resolved Hide resolved
@loyd loyd force-pushed the feat/intrusive-mailbox branch 4 times, most recently from ec6eac2 to 629bd0a Compare June 30, 2024 12:52
loyd added a commit that referenced this pull request Jul 3, 2024
@loyd loyd force-pushed the feat/intrusive-mailbox branch from 785adf5 to 60956ff Compare July 3, 2024 07:39
@loyd loyd force-pushed the feat/intrusive-mailbox branch from 60956ff to 13ff047 Compare July 4, 2024 09:15
@loyd loyd merged commit 1e710b3 into master Jul 6, 2024
6 checks passed
@loyd loyd deleted the feat/intrusive-mailbox branch July 6, 2024 09:59
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.

Revise the mailbox implementation
2 participants