Mercurial > hg > orthanc
comparison UnitTestsSources/MultiThreading.cpp @ 777:9ae0bb3f188b lua-scripting
integration mainline->lua-scripting
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 30 Apr 2014 17:56:37 +0200 |
parents | d3ba35466225 be87dd517416 |
children | 76eb563f08f0 |
comparison
equal
deleted
inserted
replaced
775:d3ba35466225 | 777:9ae0bb3f188b |
---|---|
221 ReusableDicomUserConnection c; | 221 ReusableDicomUserConnection c; |
222 c.SetMillisecondsBeforeClose(200); | 222 c.SetMillisecondsBeforeClose(200); |
223 printf("START\n"); fflush(stdout); | 223 printf("START\n"); fflush(stdout); |
224 | 224 |
225 { | 225 { |
226 ReusableDicomUserConnection::Connection cc(c, "STORESCP", "localhost", 2000, ModalityManufacturer_Generic); | 226 ReusableDicomUserConnection::Locker lock(c, "STORESCP", "localhost", 2000, ModalityManufacturer_Generic); |
227 cc.GetConnection().StoreFile("/home/jodogne/DICOM/Cardiac/MR.X.1.2.276.0.7230010.3.1.4.2831157719.2256.1336386844.676281"); | 227 lock.GetConnection().StoreFile("/home/jodogne/DICOM/Cardiac/MR.X.1.2.276.0.7230010.3.1.4.2831157719.2256.1336386844.676281"); |
228 } | 228 } |
229 | 229 |
230 printf("**\n"); fflush(stdout); | 230 printf("**\n"); fflush(stdout); |
231 Toolbox::USleep(1000000); | 231 Toolbox::USleep(1000000); |
232 printf("**\n"); fflush(stdout); | 232 printf("**\n"); fflush(stdout); |
233 | 233 |
234 { | 234 { |
235 ReusableDicomUserConnection::Connection cc(c, "STORESCP", "localhost", 2000, ModalityManufacturer_Generic); | 235 ReusableDicomUserConnection::Locker lock(c, "STORESCP", "localhost", 2000, ModalityManufacturer_Generic); |
236 cc.GetConnection().StoreFile("/home/jodogne/DICOM/Cardiac/MR.X.1.2.276.0.7230010.3.1.4.2831157719.2256.1336386844.676277"); | 236 lock.GetConnection().StoreFile("/home/jodogne/DICOM/Cardiac/MR.X.1.2.276.0.7230010.3.1.4.2831157719.2256.1336386844.676277"); |
237 } | 237 } |
238 | 238 |
239 Toolbox::ServerBarrier(); | 239 Toolbox::ServerBarrier(); |
240 printf("DONE\n"); fflush(stdout); | 240 printf("DONE\n"); fflush(stdout); |
241 } | 241 } |