File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,20 @@ pub type PlatformThreadHandle = RawPthread;
25
25
#[ cfg( windows) ]
26
26
pub type PlatformThreadHandle = RawHandle ;
27
27
28
+ /// A noop thread join handle for wasm
29
+ #[ cfg( target_arch = "wasm32" ) ]
30
+ pub struct DummyThreadHandle ;
31
+ #[ cfg( target_arch = "wasm32" ) ]
32
+ impl DummyThreadHandle {
33
+ /// A noop thread join method for wasm
34
+ pub fn join ( & self ) {
35
+ // Do nothing
36
+ }
37
+ }
38
+ #[ cfg( target_arch = "wasm32" ) ]
39
+ /// Platform-specific handle to a thread.
40
+ pub type PlatformThreadHandle = DummyThreadHandle ;
41
+
28
42
/// Global style data
29
43
pub struct GlobalStyleData {
30
44
/// Shared RWLock for CSSOM objects
@@ -131,6 +145,8 @@ impl StyleThreadPool {
131
145
let handle = join_handle. as_pthread_t ( ) ;
132
146
#[ cfg( windows) ]
133
147
let handle = join_handle. as_raw_handle ( ) ;
148
+ #[ cfg( target_arch = "wasm32" ) ]
149
+ let handle = DummyThreadHandle ;
134
150
135
151
handles. push ( handle) ;
136
152
}
You can’t perform that action at this time.
0 commit comments