Changeset f4167637 in sasview for src


Ignore:
Timestamp:
Aug 13, 2014 9:37:01 PM (10 years ago)
Author:
butler
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.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
2b875e4c, 66f21cd
Parents:
9afebe1
Message:

update Pr and simulations to fix thread problem. note: I don't think simulations is used at this point but figure it should be fixed if in repo.

Location:
src/sans/perspectives
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sans/perspectives/pr/pr.py

    r5777106 rf4167637  
    724724        if self.calc_thread != None and self.calc_thread.isrunning(): 
    725725            self.calc_thread.stop() 
     726            ## stop just raises the flag -- the thread is supposed to  
     727            ## then kill itself but cannot.  Paul Kienzle came up with 
     728            ## this fix to prevent threads from stepping on each other 
     729            ## in Calc1D of fitting.py which was causing a simple custom model 
     730            ## to crash Sasview.  See rest of notes under Calc1D. 
     731            ## 
     732            ##    -PDB August 13, 2014                   
     733            while self.calc_thread.isrunning(): 
     734                time.sleep(0.1) 
    726735                 
    727736        pr = self.pr.clone() 
     
    11431152            self.estimation_thread.isrunning(): 
    11441153            self.estimation_thread.stop() 
     1154            ## stop just raises the flag -- the thread is supposed to  
     1155            ## then kill itself but cannot.  Paul Kienzle came up with 
     1156            ## this fix to prevent threads from stepping on each other 
     1157            ## in Calc1D of fitting.py which was causing a simple custom model 
     1158            ## to crash Sasview.  See rest of notes under Calc1D. 
     1159            ## 
     1160            ##    -PDB August 13, 2014                   
     1161            while self.estimation_thread.isrunning(): 
     1162                time.sleep(0.1) 
     1163                 
    11451164                 
    11461165        pr = self.pr.clone() 
     
    11611180        if self.estimation_thread != None and self.estimation_thread.isrunning(): 
    11621181            self.estimation_thread.stop() 
    1163                  
     1182            ## stop just raises the flag -- the thread is supposed to  
     1183            ## then kill itself but cannot.  Paul Kienzle came up with 
     1184            ## this fix to prevent threads from stepping on each other 
     1185            ## in Calc1D of fitting.py which was causing a simple custom model 
     1186            ## to crash Sasview.  See rest of notes under Calc1D. 
     1187            ## 
     1188            ##    -PDB August 13, 2014                   
     1189            while self.estimation_thread.isrunning(): 
     1190                time.sleep(0.1) 
     1191                                 
    11641192        pr = self.pr.clone() 
    11651193        # Skip the slit settings for the estimation 
  • src/sans/perspectives/simulation/simulation.py

    ra855fec rf4167637  
    213213        if self.calc_thread_1D != None and self.calc_thread_1D.isrunning(): 
    214214            self.calc_thread_1D.stop() 
     215            ## stop just raises the flag -- the thread is supposed to  
     216            ## then kill itself but cannot.  Paul Kienzle came up with 
     217            ## this fix to prevent threads from stepping on each other 
     218            ## in Calc1D of fitting.py which was causing a simple custom model 
     219            ## to crash Sasview.  See rest of notes under Calc1D. 
     220            ## 
     221            ##    -PDB August 13, 2014                   
     222            while self.calc_thread_1D.isrunning(): 
     223                time.sleep(0.1) 
    215224             
    216225        # Create a computation thread 
Note: See TracChangeset for help on using the changeset viewer.