File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 1- // Windows only currently
1+ # [ cfg ( all ( windows , not ( target_vendor = "uwp" ) ) ) ]
22use backtrace:: { Backtrace , BacktraceFrame } ;
3+ #[ cfg( all( windows, not( target_vendor = "uwp" ) ) ) ]
34use std:: os:: windows:: prelude:: AsRawHandle ;
45
6+ #[ cfg( all( windows, not( target_vendor = "uwp" ) ) ) ]
57fn worker ( ) {
68 foo ( ) ;
79}
10+
11+ #[ cfg( all( windows, not( target_vendor = "uwp" ) ) ) ]
812fn foo ( ) {
913 bar ( )
1014}
15+
16+ #[ cfg( all( windows, not( target_vendor = "uwp" ) ) ) ]
1117fn bar ( ) {
1218 baz ( )
1319}
20+
21+ #[ cfg( all( windows, not( target_vendor = "uwp" ) ) ) ]
1422fn baz ( ) {
1523 println ! ( "Hello from thread!" ) ;
1624 // Sleep for simple sync. Can't read thread that has finished running
17- // std::thread::sleep(std::time::Duration::from_millis(1000));
25+ std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 1000 ) ) ;
1826 loop {
1927 print ! ( "" ) ;
2028 }
2129}
2230
31+ #[ cfg( all( windows, not( target_vendor = "uwp" ) ) ) ]
2332fn main ( ) {
2433 let thread = std:: thread:: spawn ( || {
2534 worker ( ) ;
@@ -41,3 +50,8 @@ fn main() {
4150 bt. resolve ( ) ;
4251 println ! ( "{:?}" , bt) ;
4352}
53+
54+ #[ cfg( not( all( windows, not( target_vendor = "uwp" ) ) ) ) ]
55+ fn main ( ) {
56+ println ! ( "This example is skipped on non Windows platforms" ) ;
57+ }
You can’t perform that action at this time.
0 commit comments