Opened 8 years ago
Closed 7 years ago
#869 closed defect (fixed)
fit page computation thread cleanup
Reported by: | pkienzle | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | SasView 4.2.0 |
Component: | SasView | Keywords: | |
Cc: | Work Package: | SasView Bug Fixing |
Description
Should only allow a single computation thread at a time on a fit page. Specifically, it makes no sense to hit a 1D or 2D model while a fit is going on in the same page is not sensible. Maybe the page should be disabled except for a stop but while the fit is in progress?
It is useful to let a fit run in the background for one model while preparing another model for fitting.
Change History (5)
comment:1 Changed 8 years ago by pkienzle
comment:2 Changed 8 years ago by pkienzle
Note: no way to stop a fit in progress if the controlling fit page has been closed.
comment:3 Changed 8 years ago by pkienzle
- Milestone changed from SasView 4.1.0 to SasView 4.2.0
comment:4 Changed 8 years ago by pkienzle
The proposed fix will also address ticket #14 since the request to recompute the model as each parameter is set will be ignored until after the final parameter is set.
comment:5 Changed 7 years ago by krzywon
- Resolution set to fixed
- Status changed from new to closed
The recompute issue was handled in PR109.
Instead of using CallAfter to trigger the computation in the fitting perspective, we could instead put a cancellable timer in _draw_model1D/_draw_model2D/fit. If there has been a requests in the past 100 ms (and if the existing calculation has not yet stopped), then reset the timer, otherwise go ahead and start the calc thread.
The logic would be something like the following: