File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ impl StyleThreadPool {
101
101
}
102
102
{
103
103
// Drop the pool.
104
- let _ = STYLE_THREAD_POOL . lock ( ) . unwrap ( ) . style_thread_pool . write ( ) . take ( ) ;
104
+ let _ = STYLE_THREAD_POOL . style_thread_pool . write ( ) . take ( ) ;
105
105
}
106
106
107
107
// Join spawned threads until all of the threads have been joined. This
@@ -153,7 +153,7 @@ pub(crate) const STYLO_MAX_THREADS: usize = 6;
153
153
154
154
lazy_static ! {
155
155
/// Global thread pool
156
- pub static ref STYLE_THREAD_POOL : std :: sync :: Mutex < StyleThreadPool > = {
156
+ pub static ref STYLE_THREAD_POOL : StyleThreadPool = {
157
157
use std:: cmp;
158
158
// We always set this pref on startup, before layout or script have had a chance of
159
159
// accessing (and thus creating) the thread-pool.
@@ -196,10 +196,10 @@ lazy_static! {
196
196
( workers. ok( ) , Some ( num_threads) )
197
197
} ;
198
198
199
- std :: sync :: Mutex :: new ( StyleThreadPool {
199
+ StyleThreadPool {
200
200
num_threads,
201
201
style_thread_pool: RwLock :: new( pool) ,
202
- } )
202
+ }
203
203
} ;
204
204
205
205
/// Global style data
You can’t perform that action at this time.
0 commit comments