File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -186,13 +186,15 @@ impl SqliteSessionStore {
186
186
/// # fn main() -> Result { async_std::task::block_on(async {
187
187
/// let store = SqliteSessionStore::new("sqlite:%3Amemory:").await?;
188
188
/// store.migrate().await?;
189
+ /// # let join_handle =
189
190
/// store.spawn_cleanup_task(Duration::from_secs(1));
190
191
/// let mut session = Session::new();
191
192
/// session.expire_in(Duration::from_secs(0));
192
193
/// store.store_session(session).await;
193
194
/// assert_eq!(store.count().await?, 1);
194
195
/// async_std::task::sleep(Duration::from_secs(2)).await;
195
196
/// assert_eq!(store.count().await?, 0);
197
+ /// # join_handle.cancel().await;
196
198
/// # Ok(()) }) }
197
199
/// ```
198
200
pub fn spawn_cleanup_task ( & self , period : Duration ) -> task:: JoinHandle < ( ) > {
You can’t perform that action at this time.
0 commit comments