Skip to content

feat: impl Any for MemoryPool#21803

Open
haohuaijin wants to merge 4 commits intoapache:mainfrom
haohuaijin:memory-any
Open

feat: impl Any for MemoryPool#21803
haohuaijin wants to merge 4 commits intoapache:mainfrom
haohuaijin:memory-any

Conversation

@haohuaijin
Copy link
Copy Markdown
Contributor

@haohuaijin haohuaijin commented Apr 23, 2026

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

implment Any for MemoryPool

Are these changes tested?

yes, add one test case

Are there any user-facing changes?

@github-actions github-actions Bot added the execution Related to the execution crate label Apr 23, 2026
/// * [`TrackConsumersPool`]: Wraps another [`MemoryPool`] and tracks consumers,
/// providing better error messages on the largest memory users.
pub trait MemoryPool: Send + Sync + std::fmt::Debug + Display {
pub trait MemoryPool: Any + Send + Sync + std::fmt::Debug + Display {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adding Any as a supertrait adds a 'static requirement to every MemoryPool implementor. This might break downstream if they have implemented custom pools which borrowed state or lifetime parameters

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thank you for mention this, i add upgrade guide in 344b52f

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation execution Related to the execution crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

impl Any for MemoryPool

2 participants