# File lib/god/task.rb, line 237
    def action(a, c = nil)
      if Thread.current != self.driver.thread
        # called from outside Driver
        
        # send an async message to Driver
        self.driver.message(:action, [a, c])
      else
        # called from within Driver
        
        if self.respond_to?(a)
          command = self.send(a)
          
          case command
            when String
              msg = "#{self.name} #{a}: #{command}"
              applog(self, :info, msg)
              
              system(command)
            when Proc
              msg = "#{self.name} #{a}: lambda"
              applog(self, :info, msg)
              
              command.call
            else
              raise NotImplementedError
          end
        end
      end
    end