-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[FleetExecutor]Add interceptor message handle #37093
[FleetExecutor]Add interceptor message handle #37093
Conversation
Thanks for your contribution! |
@@ -32,13 +33,21 @@ namespace distributed { | |||
class TaskNode; | |||
|
|||
class Interceptor { | |||
public: | |||
using InterceptorHandle = std::function<void(const InterceptorMessage&)>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InterceptorMessageHandle? 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too looooong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MsgHandle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
next PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -49,6 +58,8 @@ class Interceptor { | |||
bool EnqueueRemoteInterceptorMessage( | |||
const InterceptorMessage& interceptor_message); | |||
|
|||
void Send(int64_t dst_id, std::unique_ptr<InterceptorMessage> msg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为什么要用unique_ptr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可能需要改写message,没有用const引用,然后send出去应该就交给message bus管理了,就先用了unique_ptr,理论上用shared_ptr或者直接一个指针也行。
PR types
Others
PR changes
Others
Describe
Add interceptor message handle and send function