goingforstudying-ctrl commented on code in PR #2779:
URL:
https://github.com/apache/datafusion-ballista/pull/2779#discussion_r4489351080
##########
ballista/core/src/client_pool.rs:
##########
@@ -92,6 +92,10 @@ pub trait BallistaClientPool: Send + Sync + Debug {
pub struct SharedClient {
client: BallistaClient,
discarded: AtomicBool,
+ /// Runs once, on the first [discard](Self::discard). A pool uses it to
+ /// drop the connection's slot eagerly instead of waiting for the next
+ /// eviction pass.
+ on_discard: Mutex<Option<Box<dyn FnOnce() + Send + Sync>>>,
Review Comment:
Dropped in f47631b. `set_discard_hook` takes `Box<dyn FnOnce() + Send>` now,
and the new test closes over a `Cell` (Send, not Sync) so it only compiles
while the bound stays off.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]