File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
- // Windows only currently
2
1
use backtrace:: { Backtrace , BacktraceFrame } ;
2
+ #[ cfg( all( windows, not( target_vendor = "uwp" ) ) ) ]
3
3
use std:: os:: windows:: prelude:: AsRawHandle ;
4
4
5
5
fn worker ( ) {
@@ -14,12 +14,13 @@ fn bar() {
14
14
fn baz ( ) {
15
15
println ! ( "Hello from thread!" ) ;
16
16
// Sleep for simple sync. Can't read thread that has finished running
17
- // std::thread::sleep(std::time::Duration::from_millis(1000));
17
+ std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 1000 ) ) ;
18
18
loop {
19
19
print ! ( "" ) ;
20
20
}
21
21
}
22
22
23
+ #[ cfg( all( windows, not( target_vendor = "uwp" ) ) ) ]
23
24
fn main ( ) {
24
25
let thread = std:: thread:: spawn ( || {
25
26
worker ( ) ;
@@ -41,3 +42,6 @@ fn main() {
41
42
bt. resolve ( ) ;
42
43
println ! ( "{:?}" , bt) ;
43
44
}
45
+
46
+ #[ cfg( not( all( windows, not( target_vendor = "uwp" ) ) ) ) ]
47
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments