diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-07-15 11:02:53 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-07-15 15:22:33 +0300 |
commit | ddafde7b3794b255e846fa20ba6f00ca2ef4eeed (patch) | |
tree | 35df35861a1e507216c3181aa1f502b2fb2faecf /src/components/mail/listing/conversations.rs | |
parent | 08c462801d6803d990e5188cf878a1ca42543b0f (diff) |
jobs: save handle for each Job
If we save the JoinHandle for each task, we can cancel it in future
commits if we have to timeout network requests.
Diffstat (limited to 'src/components/mail/listing/conversations.rs')
-rw-r--r-- | src/components/mail/listing/conversations.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/mail/listing/conversations.rs b/src/components/mail/listing/conversations.rs index 7b48fff4..cb69bd10 100644 --- a/src/components/mail/listing/conversations.rs +++ b/src/components/mail/listing/conversations.rs @@ -1354,12 +1354,12 @@ impl Component for ConversationsListing { self.cursor_pos.1, ) { Ok(job) => { - let (chan, job_id) = context.accounts[self.cursor_pos.0] + let (chan, handle, job_id) = context.accounts[self.cursor_pos.0] .job_executor .spawn_specialized(job); context.accounts[self.cursor_pos.0] .active_jobs - .insert(job_id, crate::conf::accounts::JobRequest::Search); + .insert(job_id, crate::conf::accounts::JobRequest::Search(handle)); self.search_job = Some((filter_term.to_string(), chan, job_id)); } Err(err) => { |