Class: God::Driver

Class | God::Driver
In: | lib/god/driver.rb
Parent: | Object

### Methods

clear_events handle_event handle_op message new schedule

### Constants

INTERVAL | = | 0.25

### Attributes

thread | [R] |

### Public Class methods

new(task)

Instantiate a new Driver and start the scheduler loop to handle events

      +task+ is the Task this Driver belongs to

Returns Driver

### Public Instance methods

clear_events()

Clear all events for this Driver

Returns nothing

handle_event()

Handle the next event (poll condition) that is due

Returns nothing

handle_op()

Handle the next queued operation that was issued asynchronously

Returns nothing

message(name, args = [])

Queue an asynchronous message

      +name+ is the Symbol name of the operation
      +args+ is an optional Array of arguments

Returns nothing

schedule(condition, delay = condition.interval)

Create and schedule a new DriverEvent

      +condition+ is the Condition
      +delay+ is the number of seconds to delay (default: interval defined in condition)

Returns nothing

[Validate]