#1702: Scheduler doesn't ever shut down if interval_task was executing when
interrupt sent
------------------------+---------------------------------------------------
 Reporter:  xentac      |        Owner:  anonymous
     Type:  defect      |       Status:  new      
 Priority:  normal      |    Milestone:  1.1      
Component:  TurboGears  |      Version:  1.0.4.2  
 Severity:  normal      |   Resolution:           
 Keywords:              |  
------------------------+---------------------------------------------------
Comment (by xentac):

 It's been a while since I thought about this code...

 But I think one of the problems was that there's no difference between not
 running and shutting down.  If I want to shut down the scheduler, I don't
 ever want to reschedule anything.

 You could make a Scheduler.shutdown method that set self.shuttingdown =
 True and everywhere that you check self.running you check
 self.shuttingdown also.  If self.shuttingdown is True then don't execute
 anything (vs. queuing in the case of self.running).

 Then in the startup module make it call scheduler._shutdown_scheduler()
 instead of scheduler._stop_scheduler().

 If having another property doesn't seem like a good solution, make the
 state an Enum: "stopped", "running", "shuttingdown"

-- 
Ticket URL: <http://trac.turbogears.org/ticket/1702#comment:3>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to