Method: Codebot::ThreadController#start!

Defined in:
lib/codebot/thread_controller.rb

#start!(arg = nil) ⇒ Thread

Starts a new managed thread. The thread invokes the run method of the class that manages it.

Parameters:

  • arg (defaults to: nil)

    the argument to pass to the run method

Returns:

  • (Thread)

    the newly created thread

Raises:

  • (RuntimeError)

    if there was already a running thread



48
49
50
# File 'lib/codebot/thread_controller.rb', line 48

def start!(arg = nil)
  raise "#{self.class.name} is already running" unless start(arg)
end