File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -63,23 +63,19 @@ pub struct BackgroundLoadTask {
6363/// Global serial loading queue to prevent thundering herd
6464pub struct SerialLoadingQueue {
6565 sender : mpsc:: UnboundedSender < BackgroundLoadTask > ,
66- worker_handle : Option < JoinHandle < ( ) > > ,
6766}
6867
6968static LOADING_QUEUE : Lazy < Mutex < Option < SerialLoadingQueue > > > = Lazy :: new ( || Mutex :: new ( None ) ) ;
7069
7170impl SerialLoadingQueue {
7271 pub fn new ( ) -> Self {
7372 let ( sender, receiver) = mpsc:: unbounded_channel ( ) ;
74-
75- let worker_handle = tokio:: spawn ( async move {
73+
74+ tokio:: spawn ( async move {
7675 Self :: process_queue ( receiver) . await ;
7776 } ) ;
7877
79- Self {
80- sender,
81- worker_handle : Some ( worker_handle) ,
82- }
78+ Self { sender }
8379 }
8480
8581 pub fn enqueue ( & self , task : BackgroundLoadTask ) -> Result < ( ) , String > {
You can’t perform that action at this time.
0 commit comments