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

simplify interthread channel implementation #107

Merged
merged 2 commits into from
Dec 14, 2024

Conversation

garlick
Copy link
Member

@garlick garlick commented Dec 14, 2024

Problem: the interthread channel will be harder to maintain than necessary due to its use of the obscure flux_msglist pollfd/pollevents interface, an fd watcher, and a pthread mutex.

Now that we have the interthread:// connector in flux-core, re-implement the interthread channel with back to back flux_t handles and a "handle watcher".

This will also allow the flux_msglist pollfd/pollevents interface to be retired in flux-core as this is the last user.

Also: avoid using the raw message interface so flux-pmix doesn't need to require flux-core > 0.69 for ABI compatibility.

Problem: the ABI changes in flux-core 0.70 to raw payload
accessors actually need not impact this project since all
interthread payloads are NUL terminated strings.

The last parameter of flux_msg_get_payload() is changing from an
int pointer to a size_t pointer.  Just pass a NULL and avoid
the entire issue as we don't need the size.
Problem: the interthread channel will be harder to maintain than
necessary due to its use of the obscure flux_msglist pollfd/pollevents
interface, an fd watcher, and a pthread mutex.

Now that we have the interthread:// connector in flux-core,
reimplement the interthread channel with back to back flux_t handles
and a message watcher.
Copy link
Contributor

@grondo grondo left a comment

Choose a reason for hiding this comment

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

Nice!

@garlick
Copy link
Member Author

garlick commented Dec 14, 2024

Thanks! Setting MWP.

@garlick garlick added the merge-when-passing Let mergify auto-rebase and merge when CI passes label Dec 14, 2024
@mergify mergify bot merged commit 0d603cc into flux-framework:main Dec 14, 2024
14 checks passed
@garlick garlick deleted the interthread_cleanup branch December 14, 2024 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-when-passing Let mergify auto-rebase and merge when CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants