@@ -40,6 +40,10 @@ impl MyClass {
4040///
4141/// This should not cause borrow failures and should not lead to deadlocks.
4242#[ test]
43+ #[ cfg_attr(
44+ all( target_family = "wasm" , not( target_feature = "atomics" ) ) ,
45+ ignore = "Threading not available"
46+ ) ]
4347fn calls_parallel ( ) {
4448 use std:: thread;
4549
@@ -72,6 +76,10 @@ fn calls_parallel() {
7276/// Runs each method several times in a row. This should reduce the non-determinism that comes from
7377/// scheduling of threads.
7478#[ test]
79+ #[ cfg_attr(
80+ all( target_family = "wasm" , not( target_feature = "atomics" ) ) ,
81+ ignore = "Threading not available"
82+ ) ]
7583fn calls_parallel_many_serial ( ) {
7684 use std:: thread;
7785
@@ -106,6 +114,10 @@ fn calls_parallel_many_serial() {
106114/// Runs all the tests several times. This is different from [`calls_parallel_many_serial`] as that calls the
107115/// methods like AAA...BBB...CCC..., whereas this interleaves the methods like ABC...ABC...ABC...
108116#[ test]
117+ #[ cfg_attr(
118+ all( target_family = "wasm" , not( target_feature = "atomics" ) ) ,
119+ ignore = "Threading not available"
120+ ) ]
109121fn calls_parallel_many_parallel ( ) {
110122 use std:: thread;
111123
@@ -142,6 +154,10 @@ fn calls_parallel_many_parallel() {
142154/// a) Thread A holds mutable reference AND thread B holds no references.
143155/// b) One or more threads hold shared references AND thread A holds no references
144156#[ test]
157+ #[ cfg_attr(
158+ all( target_family = "wasm" , not( target_feature = "atomics" ) ) ,
159+ ignore = "Threading not available"
160+ ) ]
145161fn non_blocking_reborrow ( ) {
146162 use std:: thread;
147163 let instance_id = MyClass :: init ( ) ;
@@ -172,6 +188,10 @@ fn non_blocking_reborrow() {
172188/// This verifies that the thread which initialized the `GdCell` does not panic when it attempts to mutably borrow while there is already a
173189/// shared borrow on an other thread.
174190#[ test]
191+ #[ cfg_attr(
192+ all( target_family = "wasm" , not( target_feature = "atomics" ) ) ,
193+ ignore = "Threading not available"
194+ ) ]
175195fn no_mut_panic_on_main ( ) {
176196 use std:: thread;
177197 let instance_id = MyClass :: init ( ) ;
0 commit comments