@@ -40,6 +40,10 @@ impl MyClass {
40
40
///
41
41
/// This should not cause borrow failures and should not lead to deadlocks.
42
42
#[ test]
43
+ #[ cfg_attr(
44
+ all( target_family = "wasm" , not( target_feature = "atomics" ) ) ,
45
+ ignore = "Threading not available"
46
+ ) ]
43
47
fn calls_parallel ( ) {
44
48
use std:: thread;
45
49
@@ -72,6 +76,10 @@ fn calls_parallel() {
72
76
/// Runs each method several times in a row. This should reduce the non-determinism that comes from
73
77
/// scheduling of threads.
74
78
#[ test]
79
+ #[ cfg_attr(
80
+ all( target_family = "wasm" , not( target_feature = "atomics" ) ) ,
81
+ ignore = "Threading not available"
82
+ ) ]
75
83
fn calls_parallel_many_serial ( ) {
76
84
use std:: thread;
77
85
@@ -106,6 +114,10 @@ fn calls_parallel_many_serial() {
106
114
/// Runs all the tests several times. This is different from [`calls_parallel_many_serial`] as that calls the
107
115
/// methods like AAA...BBB...CCC..., whereas this interleaves the methods like ABC...ABC...ABC...
108
116
#[ test]
117
+ #[ cfg_attr(
118
+ all( target_family = "wasm" , not( target_feature = "atomics" ) ) ,
119
+ ignore = "Threading not available"
120
+ ) ]
109
121
fn calls_parallel_many_parallel ( ) {
110
122
use std:: thread;
111
123
@@ -142,6 +154,10 @@ fn calls_parallel_many_parallel() {
142
154
/// a) Thread A holds mutable reference AND thread B holds no references.
143
155
/// b) One or more threads hold shared references AND thread A holds no references
144
156
#[ test]
157
+ #[ cfg_attr(
158
+ all( target_family = "wasm" , not( target_feature = "atomics" ) ) ,
159
+ ignore = "Threading not available"
160
+ ) ]
145
161
fn non_blocking_reborrow ( ) {
146
162
use std:: thread;
147
163
let instance_id = MyClass :: init ( ) ;
@@ -172,6 +188,10 @@ fn non_blocking_reborrow() {
172
188
/// This verifies that the thread which initialized the `GdCell` does not panic when it attempts to mutably borrow while there is already a
173
189
/// shared borrow on an other thread.
174
190
#[ test]
191
+ #[ cfg_attr(
192
+ all( target_family = "wasm" , not( target_feature = "atomics" ) ) ,
193
+ ignore = "Threading not available"
194
+ ) ]
175
195
fn no_mut_panic_on_main ( ) {
176
196
use std:: thread;
177
197
let instance_id = MyClass :: init ( ) ;
0 commit comments