Ignore:
Timestamp:
Apr 6, 2017 12:42:32 PM (8 years ago)
Author:
Tim Snow <tim.snow@…>
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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
5c6002a
Parents:
922ef55
Message:

End of day commit

This is rejecting and accepting calculations from the GUI as desired,
will remove print statements and test this tomorrow.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/basepage.py

    r922ef55 rf2cc00b  
    17091709        # # So, if a whole pile of jobs are submitted in quick succession,  
    17101710        # # let's say in less than 0.1 sec, we'll filter them out, assuming something is running! 
     1711 
    17111712        if ((self._manager.calc_1D is not None) and self._manager.calc_1D.isrunning()) or ((self._manager.calc_2D is not None) and self._manager.calc_2D.isrunning()): 
    17121713            if currentTime > (self.lastTimeFitSubmitted + 0.1): 
     
    17171718                    print 'here' 
    17181719                else: 
     1720                    while self.threadedDrawQueue.empty() != True: 
     1721                        self.threadedDrawQueue.get() 
     1722                        self.threadedDrawQueue.task_done() 
     1723 
     1724                    self.threadedDrawQueue.put([update_chisqr, source]) 
    17191725                    print 'rejected' 
     1726         
    17201727        else: 
    17211728            self.threadedDrawQueue.put([update_chisqr, source]) 
     
    17251732    def _threaded_draw_worker(self, threadedDrawQueue): 
    17261733        while True: 
    1727             inputVariables = threadedDrawQueue.get() 
    1728             self._draw_model_after(inputVariables[0], inputVariables[1]) 
    1729             wx.PostEvent(self._manager.parent, StatusEvent(status="Computation is in progress...", type = "progress")) 
    1730             threadedDrawQueue.task_done() 
     1734            if ((self._manager.calc_1D is not None) and self._manager.calc_1D.isrunning()) or ((self._manager.calc_2D is not None) and self._manager.calc_2D.isrunning()): 
     1735                pass 
     1736            else: 
     1737                inputVariables = threadedDrawQueue.get() 
     1738                self._draw_model_after(inputVariables[0], inputVariables[1]) 
     1739                wx.PostEvent(self._manager.parent, StatusEvent(status="Computation is in progress...", type = "progress")) 
     1740                threadedDrawQueue.task_done() 
     1741                print 'added' 
    17311742 
    17321743    def _draw_model_after(self, update_chisqr=True, source='model'): 
Note: See TracChangeset for help on using the changeset viewer.