pub(crate) async fn check_in(
        &self,
        session: ServerSession,
        logical_session_timeout: Option<Duration>,
    ) {
        let mut pool = self.pool.lock().await;
        while let Some(pooled_session) = pool.pop_back() {
            if session.is_about_to_expire(logical_session_timeout) {
                continue;
            }
            pool.push_back(pooled_session);
            break;
        }

        if !session.dirty && !session.is_about_to_expire(logical_session_timeout) {
            pool.push_front(session);
        }
    }
/// Checks in a server session to the pool. If it is about to expire or is dirty, it will be
/// discarded.
///
/// This method will also clear out any expired session from the pool before checking in.
Checks in a server session to the pool. If it is about to expire or is dirty, it will be
discarded.

This method will also clear out any expired session from the pool before checking in.
Checks in a server session to the pool . If it is about to expire or is dirty it will be discarded . This method will also clear out any expired session from the pool before checking in .
pub(crate) async fn check_in(
        &self,
        session: ServerSession,
        logical_session_timeout: Option<Duration>,
    ) {
        let mut pool = self.pool.lock().await;
        while let Some(pooled_session) = pool.pop_back() {
            if session.is_about_to_expire(logical_session_timeout) {
                continue;
            }
            pool.push_back(pooled_session);
            break;
        }
        if !session.dirty && !session.is_about_to_expire(logical_session_timeout) {
            pool.push_front(session);
        }
    }
pub ( crate ) async fn check_in ( & self , session : ServerSession , logical_session_timeout : Option < Duration > , ) { let mut pool = self . pool . lock ( ) . await ; while let Some ( pooled_session ) = pool . pop_back ( ) { if session . is_about_to_expire ( logical_session_timeout ) { continue ; } pool . push_back ( pooled_session ) ; break ; } if ! session . dirty && ! session . is_about_to_expire ( logical_session_timeout ) { pool . push_front ( session ) ; } }
Checks in a server session to the pool.
Checks in a server session to the pool .
&self
session
ServerSession
logical_session_timeout
Option<Duration>
&self
session
ServerSession
logical_session_timeout
Option<Duration>