File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ struct CancellableTask {
33
33
join_handle : JoinHandle < ( ) > ,
34
34
}
35
35
36
- /// A worker that runs jobs from the queue.
36
+ /// A worker that runs jobs from the queue. Dropping a worker will disconnect it and stop running
37
+ /// jobs.
37
38
#[ must_use = "Workers must be stored. Dropping a worker early will disconnect it from the queue." ]
38
39
pub struct Worker {
39
40
/// The worker's internal ID.
@@ -194,7 +195,8 @@ where
194
195
self
195
196
}
196
197
197
- /// Consume this [WorkerBuilder] and create a new [Worker].
198
+ /// Consume this [WorkerBuilder] and create a new [Worker]. The Worker must be stored, as it
199
+ /// will automatically disconnect from the Queue when it is dropped.
198
200
pub async fn build ( self ) -> Result < Worker > {
199
201
let job_defs: HashMap < SmartString , JobRunner < CONTEXT > > =
200
202
if let Some ( job_defs) = self . job_defs {
You can’t perform that action at this time.
0 commit comments