Slot

A narrow opening in a machine or container, especially one into which a coin can be inserted. A slot is a position in a schedule or program where something can take place. The bus arrived at its slot on the timetable.

In a slot game, the player inserts cash or, in “ticket-in, ticket-out” machines, a paper ticket with a barcode into a designated slot on the machine. The machine then spins and stops to rearrange the symbols, and if the player hits a winning combination, the player earns credits based on the paytable. Most slot games have a theme, and the symbols vary according to that theme. Some classic symbols include fruits, bells, and stylized lucky sevens.

Slots, along with signals, make up a powerful component programming mechanism. A slot is a special function that can receive signals, and is accessed through an object’s class name or its instance variable. In practice, using slots instead of callbacks reduces code complexity and maintainability. However, signaling to multiple slots does introduce some overhead; in particular, emitting a signal that is connected to multiple receivers takes about ten times longer than simply calling the receivers directly (because of the extra work needed to locate the connections, safely iterate over them, and marshall the parameters).