Skip to content

Commit

Permalink
[ISSUE #1676] Optimize MessageListenerConcurrentlyFn signature (#2423)
Browse files Browse the repository at this point in the history
* [ISSUE #1676] Optimize MessageListenerConcurrentlyFn signature

* [ISSUE #1676] Optimize MessageListenerConcurrentlyFn signature
  • Loading branch information
yuz10 authored Jan 28, 2025
1 parent 840d3a6 commit 35f6e2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub trait MessageListenerConcurrently: Sync + Send {
pub type ArcBoxMessageListenerConcurrently = Arc<Box<dyn MessageListenerConcurrently>>;

pub type MessageListenerConcurrentlyFn = Arc<
dyn Fn(Vec<MessageExt>, ConsumeConcurrentlyContext) -> Result<ConsumeConcurrentlyStatus>
dyn Fn(&[&MessageExt], &ConsumeConcurrentlyContext) -> Result<ConsumeConcurrentlyStatus>
+ Send
+ Sync,
>;
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ pub trait MessageListenerOrderly: Sync + Send {
pub type ArcBoxMessageListenerOrderly = Arc<Box<dyn MessageListenerOrderly>>;

pub type MessageListenerOrderlyFn = Arc<
dyn Fn(&[MessageExt], &ConsumeOrderlyContext) -> Result<ConsumeOrderlyStatus> + Send + Sync,
dyn Fn(&[&MessageExt], &ConsumeOrderlyContext) -> Result<ConsumeOrderlyStatus> + Send + Sync,
>;

0 comments on commit 35f6e2a

Please # to comment.