Changeset 9c3d784 in sasview for src/sas/sascalc/data_util
- Timestamp:
- Apr 30, 2017 4:15:17 PM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- a1b8fee
- Parents:
- b636dfc5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/data_util/calcthread.py
r7432acb r9c3d784 295 295 """ 296 296 def __init__(self, n=20000): 297 print thread.get_ident()297 print(thread.get_ident()) 298 298 self.starttime = clock() 299 299 self.done = False … … 307 307 self.work2.queue(n) 308 308 self.work3.queue(n) 309 print "Expect updates from Main every second and from thread every 2.5 seconds"310 print ""309 print("Expect updates from Main every second and from thread every 2.5 seconds") 310 print("") 311 311 self.work.ready(.5) 312 312 while not self.done: 313 313 sleep(1) 314 print 315 clock() - self.starttime) 314 print("Main thread %d at %.2f" % (thread.get_ident(), 315 clock() - self.starttime)) 316 316 317 317 def update(self, i=0): 318 print 319 clock() - self.starttime) 318 print("Update i=%d from thread %d at %.2f" % (i, thread.get_ident(), 319 clock() - self.starttime)) 320 320 self.work.ready(2.5) 321 321 322 322 def complete(self, total=0.0): 323 print 323 print("Complete total=%g from thread %d at %.2f" % (total, 324 324 thread.get_ident(), 325 clock() - self.starttime) 325 clock() - self.starttime)) 326 326 self.done = True
Note: See TracChangeset
for help on using the changeset viewer.