pub fn set_session(session: Option<String>)
Set the current thread-local session id.
Call this at the start of a background thread that captured the session id from the parent request loop.