diff --git a/lib/god/driver.rb b/lib/god/driver.rb index e15bf561..13520db3 100644 --- a/lib/god/driver.rb +++ b/lib/god/driver.rb @@ -182,6 +182,13 @@ def initialize(task) def clear_events @events.clear end + + # Shutdown the DriverEventQueue threads + # + # Returns nothing + def shutdown + @events.shutdown + end # Queue an asynchronous message # +name+ is the Symbol name of the operation diff --git a/lib/god/task.rb b/lib/god/task.rb index f9e3a440..5bec0784 100644 --- a/lib/god/task.rb +++ b/lib/god/task.rb @@ -299,7 +299,7 @@ def register! end def unregister! - # override if necessary + driver.shutdown end ########################################################################### diff --git a/lib/god/watch.rb b/lib/god/watch.rb index 8476c8b0..d648a244 100644 --- a/lib/god/watch.rb +++ b/lib/god/watch.rb @@ -177,6 +177,7 @@ def register! def unregister! God.registry.remove(@process) + super end end