Replies: 4 comments 2 replies
-
You can add a deadpool/tests/managed_hooks.rs Lines 131 to 141 in f35ac2a That e.g. if you wanted to discard objects which weren't recycled within the last minute or so you can do it like that: .pre_recycle(Hook::sync_fn(|_, metrics| {
if metrics.last_used() > Duration::from_secs(60) {
Err(HookError::Continue(None))
} else {
Ok(())
}
})) |
Beta Was this translation helpful? Give feedback.
-
Sorry. I got that wrong. You want it the other way around. Rather than fast discarding possibly broken objects you don't want to run the recycle method at all for objects which have just been returned to the pool. |
Beta Was this translation helpful? Give feedback.
-
Maybe |
Beta Was this translation helpful? Give feedback.
-
This is a requirement for #167 and will be tracked as part of this issue: |
Beta Was this translation helpful? Give feedback.
-
At the moment Deadpool recycles a connection every time it gets an existing one from the pool.
This introduces additional latency.
I wonder if recycling can be smarter and only check connections which were idle for a some time?
Beta Was this translation helpful? Give feedback.
All reactions