From ff94ef92542fcd1eec9ff84088d5a009a134b1e6 Mon Sep 17 00:00:00 2001 From: Seamus Connor Date: Mon, 8 Feb 2016 14:13:45 -0700 Subject: [PATCH] Moved away from deprecated thread::sleep_ms Refactored to use thread::sleep and time::Duration and updated link in README.md --- .README.md.swp | Bin 0 -> 53248 bytes README.md | 2 +- threads/threads1.rs | 5 +++-- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .README.md.swp diff --git a/.README.md.swp b/.README.md.swp new file mode 100644 index 0000000000000000000000000000000000000000..1019b281b567bd5e01a894eaef2ba392a5ce7309 GIT binary patch literal 53248 zcmeI5TZ|lOme*^TT^1H*XJ!X2NU%$K8t=3nQ{{4&-F6QQt#a9(_RzK)m%E$BJ=8>I zMporGGb1}9)8!g*dEla5BrXC8ad`k9Kmrzt;fdP=Xci=d5X%clydikw1q9-O9T30& zIo}r%nUz(pvd8Y3*(z1!Exzmd&UfzTi_ZG{ckZ^XtzB8+?{h0FKlc;=`29co>B*=5 z)4|G0+0Dn}ywIIv|0V~+e0*#PzxhW)gO`eIl9!hzSyATWba<(lmDAy1yjxy+aBK7C z-CJv;-U(VeD{=;bGYFg*0<&p<_4;R4HrkihRp+%Yo@;&Kr{6nq^|OL!5IBRt83fKC za0Y=h2%JIS3<75mID^0sKLn=oIIh@# zXQBS5!}rgJ_epq<{e`b*Z)XrVgTNUC&LD6Gfino4LEsDmXAn4pz!?P2AaDkOA4mwK zxY~0@_Ny8l{{N`||F6%kto%=|Kgm^aeaw|`UF7;a*XOvtfwKG&*S|!m{$;K&phW*P z*Y{Aif0gSOxqgA`-=MsI2LnMDRX?itrESD)*9q3{2r{$KImqX*eAdy!Z(#=Pc!7w}DzMO1#i+ngtdinl1>E}hV zHyBUL=Qr!*rN24=?&p(Iv%WJ_sdMN{Nl2f_N zM;Wt-;~SJ-V7iwT8Q@j-YEuQC+N@|w>r##Sp+LZYI!>~pVDW99bVO$wac8z$+HVZ6 zOrB)4m!;)FGR?sVFljKR>OtM!q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`N-n7l>hHs z|CQ^%aQ!wewed4tXMbl9_+f{@c9yjsL8@9eIe3@zpx)&up1jN_XlW&fL)lY7PZ}T$ z<)?|&Nuvpu^(=&0ojlsApH<%4^3&;0+B({lA9WBObAF*deM%|yYvJ@Ldzf-KKPoNA zFeu6|*0IFH^kA(Z%y?A^#A|u6d+9C7ieC+4w;6+L2{N!2W!;MSh~q%Y;=}VKf%^u#rd0#@io^T@0Bbl%gJFx`B1Er&bFtp8yfx}*->AFD$5}RQk zQ)>w2gA6(mrFETGFd5)k#nQ?^G|reJ$p9s3%&|s$_&X$jAI=&D%eg25Gv!Ttu56VD z>2;{i2@+)l4j$cC(hW<`h^{w8Gqu}jFN$HI zN8OE}koBsZr2BYocrGA$6X!WJ{2EcLbGou>#BuVxFk%S3>w3B>p}$zFR1ziScoaob z=~fZU`!YRody5de1|HSE$|c>arZq|iJ?+j_6Z2sBv%~a*;;i0%N+$_Cl z71(ATplX105YyQw{>f|~TM-!I{bVOc|7vVjoyb=)A2Ax%!m!#_UCY>9GueQ5IL#El z))MQ5W6GK;`2Drnc)v)owbrRf8bA>DU)QaV4QXSgja}Bf79(9uB1FKhf;RD`8{P5dUhO` zr_|$}80hij*WcB-Ug_}G$1L*AtTVG*2|K{pZNkaBA+`QqKK^!AFGy|tI-tf#&aGm zB}Urzz((vL+YekZ+}Jv5ep~ZnG+?74|rk*8`YqX1W(c7{^sjt>WhJo<71+?EnbQ14Z&E$G zNdlca!6hXk(a|uNLS5hG4Zp=5Nh~p3-whm=7S>f3J+(!47n{-&Rc-kriF0zntO{qf z*wN;m<(Q92o~Y>QVmr+t9creR!3IYPcrz=9>^GHZTMsqU!$A=zLTo8kVjiDNn6?t) ### Uncategorized diff --git a/threads/threads1.rs b/threads/threads1.rs index c19151e4..af975521 100644 --- a/threads/threads1.rs +++ b/threads/threads1.rs @@ -6,6 +6,7 @@ use std::sync::Arc; use std::thread; +use std::time::Duration; struct JobStatus { jobs_completed: u32, @@ -16,13 +17,13 @@ fn main() { let status_shared = status.clone(); thread::spawn(move || { for _ in 0..10 { - thread::sleep_ms(250); + thread::sleep(Duration::from_millis(250)); status_shared.jobs_completed += 1; } }); while status.jobs_completed < 10 { println!("waiting... "); - thread::sleep_ms(500); + thread::sleep(Duration::from_millis(500)); } }