diff options
author | Alex Auvolat <alex@adnab.me> | 2022-06-30 16:18:08 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-06-30 16:18:08 +0200 |
commit | 484ad97b65ba2295aadd9cf7eaf865573b859a10 (patch) | |
tree | 4c36e89e46676619890332baca76fe85a2a56d8f /src/mail/incoming.rs | |
parent | 3277fb16a84d1b7335a4590d69a3c65229204370 (diff) | |
download | aerogramme-484ad97b65ba2295aadd9cf7eaf865573b859a10.tar.gz aerogramme-484ad97b65ba2295aadd9cf7eaf865573b859a10.zip |
Skeleton for incoming mail processor
Diffstat (limited to 'src/mail/incoming.rs')
-rw-r--r-- | src/mail/incoming.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mail/incoming.rs b/src/mail/incoming.rs new file mode 100644 index 0000000..4455c91 --- /dev/null +++ b/src/mail/incoming.rs @@ -0,0 +1,16 @@ +use std::sync::{Arc, Weak}; +use std::time::Duration; + +use tokio::sync::watch; + +use crate::mail::unique_ident::UniqueIdent; +use crate::mail::user::User; +use crate::mail::uidindex::ImapUidvalidity; + +pub async fn incoming_mail_watch_process(user: Weak<User>, rx_inbox_id: watch::Receiver<Option<(UniqueIdent, ImapUidvalidity)>>) { + while Weak::upgrade(&user).is_some() { + eprintln!("User still available"); + tokio::time::sleep(Duration::from_secs(10)).await; + } + drop(rx_inbox_id); +} |