Changes in / [c915053:a9807efa] in sasview
- Location:
- src/sans/perspectives
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/perspectives/fitting/fitting.py
rbf5e985 r9afebe1 1962 1962 if (self.calc_2D is not None) and self.calc_2D.isrunning(): 1963 1963 self.calc_2D.stop() 1964 ## stop just raises a flag to tell the thread to kill 1965 ## itself -- see the fix in Calc1D implemented to fix 1966 ## an actual problem. Seems the fix should also go here 1967 ## and may be the cause of other noted instabilities 1968 ## 1969 ## -PDB August 12, 2014 1970 while self.calc_2D.isrunning(): 1971 time.sleep(0.1) 1964 1972 self.calc_2D = Calc2D(model=model, 1965 1973 data=data, … … 1999 2007 if (self.calc_1D is not None) and self.calc_1D.isrunning(): 2000 2008 self.calc_1D.stop() 2009 ## stop just raises the flag -- the thread is supposed to 2010 ## then kill itself but cannot. Paul Kienzle came up with 2011 ## this fix to prevent threads from stepping on each other 2012 ## which was causing a simple custom model to crash Sasview. 2013 ## We still don't know why the fit sometimes lauched a second 2014 ## thread -- something which should also be investigated. 2015 ## The thread approach was implemented in order to be able 2016 ## to lauch a computation in a separate thread from the GUI so 2017 ## that the GUI can still respond to user input including 2018 ## a request to stop the computation. 2019 ## It seems thus that the whole thread approach used here 2020 ## May need rethinking 2021 ## 2022 ## -PDB August 12, 2014 2023 while self.calc_1D.isrunning(): 2024 time.sleep(0.1) 2001 2025 self.calc_1D = Calc1D(data=data, 2002 2026 model=model, -
src/sans/perspectives/pr/pr.py
r5777106 rf4167637 724 724 if self.calc_thread != None and self.calc_thread.isrunning(): 725 725 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) 726 735 727 736 pr = self.pr.clone() … … 1143 1152 self.estimation_thread.isrunning(): 1144 1153 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 1145 1164 1146 1165 pr = self.pr.clone() … … 1161 1180 if self.estimation_thread != None and self.estimation_thread.isrunning(): 1162 1181 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 1164 1192 pr = self.pr.clone() 1165 1193 # Skip the slit settings for the estimation -
src/sans/perspectives/simulation/simulation.py
ra855fec rf4167637 213 213 if self.calc_thread_1D != None and self.calc_thread_1D.isrunning(): 214 214 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) 215 224 216 225 # Create a computation thread
Note: See TracChangeset
for help on using the changeset viewer.