Home  Contents

event.new

Event Core4 Lua Event System

SYNOPSIS

  1. app = event.new()
  2. app:close()

DESCRIPTION

The first function creates a new event processor instance which is needed to run an event loop using event:poll(). An application usually has exactly one event processor.

The second function is rarely used and releases the event processor, freeing its resources.

RETURN VALUE

An event processor instance.

NOTES

Traditionally, the variable used to hold the event processor is called app.

EXAMPLE

app = event.new()

SEE ALSO