I believe this is unintentional. Ive invesitagted it a bit, since I use god at work. Here's what I've found so far:
First off, the restart command still works, which should satisfy most needs. Stop last worked in 7.8. So, if you must have both transitions and the stop command, use that version. `gem install god -v 0.7.8` If you're interested in the god code, read on. The issue starts with the stop command sending two messages to the watch, :unmonitor and :stop. The short version is, the :stop DriverOperation is getting deleted from the DriverEventQueue when the :unmonitor event is processed (spefically by `self.driver.clear_events` in Task.move()). Here's the long version, thread A calls unmonitor on the watch. Since its a different thread than `watch.driver.thread` it adds an event to the watch.driver's queue and moves on to action(:stop). Here it's basically the same flow, thread A != watch.driver.thread, so it adds an event to watch.driver's queue and moves on. In the meantime, thread B, the drivers.thread, kicks in and starts to process its queue. It starts with :unmonitor. This results in a task.move (:unmonitor) which calls driver.clear_events and removes the :stop event before it can be handled. (Side note) When creating a test for this, make sure thread A lives longer than thread B. If it doesn't thread B stops in it's tracks and you get false negatives. Had a nice hour-long wild goose chase b/c of this ; ) My analysis so far is: We can't just remove the clear_events line. For one thing the `tries` condition relys on this line to stop it from rescheduling after a successful move. I don't know if other conditions do. I'm investigating whether we can draw the distinction between DriverEvents, which handle polling conditions, and DriverOperations, which send messages to tasks. Perhaps we would only clear DriverEvents? Tom, if you have time, I'd love to talk to you about it. I'd like to make sure I have the right understanding of the components before doing any major rewiring. On Dec 8, 4:58 am, Garry Tan <[email protected]> wrote: > This is precisely what is happening to me as well. > > Remains a problem in the latest stable distribution builds from what I > can tell. w.stop is ignored entirely. Is this by design? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "god.rb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/god-rb?hl=en -~----------~----~----~----~------~----~------~--~---
