Mercurial > hg > orthanc
comparison UnitTestsSources/MultiThreading.cpp @ 776:be87dd517416
rename
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 30 Apr 2014 17:53:01 +0200 |
parents | 3f946e5c3802 |
children | 9ae0bb3f188b 3d6f9b7d0add |
comparison
equal
deleted
inserted
replaced
774:4e3593c3511d | 776:be87dd517416 |
---|---|
223 { | 223 { |
224 ReusableDicomUserConnection c; | 224 ReusableDicomUserConnection c; |
225 c.SetMillisecondsBeforeClose(200); | 225 c.SetMillisecondsBeforeClose(200); |
226 printf("START\n"); fflush(stdout); | 226 printf("START\n"); fflush(stdout); |
227 { | 227 { |
228 ReusableDicomUserConnection::Connection cc(c, "STORESCP", "localhost", 2000, ModalityManufacturer_Generic); | 228 ReusableDicomUserConnection::Locker lock(c, "STORESCP", "localhost", 2000, ModalityManufacturer_Generic); |
229 cc.GetConnection().StoreFile("/home/jodogne/DICOM/Cardiac/MR.X.1.2.276.0.7230010.3.1.4.2831157719.2256.1336386844.676281"); | 229 lock.GetConnection().StoreFile("/home/jodogne/DICOM/Cardiac/MR.X.1.2.276.0.7230010.3.1.4.2831157719.2256.1336386844.676281"); |
230 } | 230 } |
231 | 231 |
232 printf("**\n"); fflush(stdout); | 232 printf("**\n"); fflush(stdout); |
233 Toolbox::USleep(1000000); | 233 Toolbox::USleep(1000000); |
234 printf("**\n"); fflush(stdout); | 234 printf("**\n"); fflush(stdout); |
235 | 235 |
236 { | 236 { |
237 ReusableDicomUserConnection::Connection cc(c, "STORESCP", "localhost", 2000, ModalityManufacturer_Generic); | 237 ReusableDicomUserConnection::Locker lock(c, "STORESCP", "localhost", 2000, ModalityManufacturer_Generic); |
238 cc.GetConnection().StoreFile("/home/jodogne/DICOM/Cardiac/MR.X.1.2.276.0.7230010.3.1.4.2831157719.2256.1336386844.676277"); | 238 lock.GetConnection().StoreFile("/home/jodogne/DICOM/Cardiac/MR.X.1.2.276.0.7230010.3.1.4.2831157719.2256.1336386844.676277"); |
239 } | 239 } |
240 | 240 |
241 Toolbox::ServerBarrier(); | 241 Toolbox::ServerBarrier(); |
242 printf("DONE\n"); fflush(stdout); | 242 printf("DONE\n"); fflush(stdout); |
243 } | 243 } |