Skip to content

Erlangian receives#55

Merged
ecpeterson merged 7 commits into
mainfrom
erlangian-receives
Sep 9, 2025
Merged

Erlangian receives#55
ecpeterson merged 7 commits into
mainfrom
erlangian-receives

Conversation

@ecpeterson

@ecpeterson ecpeterson commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

Reworks receive-message and friends (mostly: message-dispatch in process.lisp) to traverse the message queue in its outer loop and the receive clauses in its inner loop.

Erlang uses this other order, but mainline aether outer-traverses clauses and inner-traverses all messages in a mailbox. I think Erlang is "right": it is insensitive to the Lamport ordering between a simultaneous (timeout-free) receive and an inbound message enqueues into the inbox, whereas aether's is sensitive.

Happily, we seem to always want our algorithms to be insensitive to this, so we've implemented those defensively and they seem to Just Work in this new setting.

This probably deserves a (minor?) version bump.

@ecpeterson
ecpeterson marked this pull request as ready for review September 3, 2025 17:26
@ecpeterson
ecpeterson requested a review from karalekas September 3, 2025 17:27
Comment thread src/queue.lisp
Comment thread src/courier.lisp Outdated
Comment thread src/process/process.lisp Outdated

@karalekas karalekas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

testing looks good, thanks for doing this -- i approve pending the docstring updates

Comment thread src/queue.lisp
Comment thread src/process/process.lisp Outdated
Comment thread src/courier.lisp Outdated
@ecpeterson
ecpeterson merged commit eabfa97 into main Sep 9, 2025
1 check passed
@karalekas
karalekas deleted the erlangian-receives branch September 10, 2025 00:30
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.

2 participants