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

Rename dispatch.h -> msg_handler.h #1136

Closed
morrone opened this issue Aug 3, 2017 · 2 comments
Closed

Rename dispatch.h -> msg_handler.h #1136

morrone opened this issue Aug 3, 2017 · 2 comments
Assignees

Comments

@morrone
Copy link
Contributor

morrone commented Aug 3, 2017

It looks like src/common/libflux/dispatch.h should be renamed to msg_handler.h, since the header is almost entirely about flux_msg_handler_* function prototypes and data types.

The only appearance of the word "dispatch" in that header is in flux_dispatch_requeue(). That function only operates on a flux_t , and has no operation on flux_msg_ types to it looks like it is probably in the wrong header to begin with.

I'm guessing there are historical reasons for this since "dispatch" occurs often in dispatch.c. dispatch.c could either be renamed to msg_handler.c, or perhaps the msg_handler_* functions could be broken out into a separate msg_handler.c and leave dispatch.c in place...

@garlick
Copy link
Member

garlick commented Aug 3, 2017

dispatch.c contains both internal message dispatch code and external flux_msg_handler functions. The header is named dispatch.h to match where it's implementation is. The header is generally included indirectly through flux/core.h by users so I'm not sure the name matters that much. That said, if you think it's a good idea, I would not be opposed to renaming either or both to flux_msg_handler.[ch].

@garlick
Copy link
Member

garlick commented Aug 3, 2017

If renaming the header don't forget to update flux.h in the same directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants