Spinning wait cursor
Encyclopedia
The spinning wait cursor is a cursor in Apple's Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 that indicates an application
Application software
Application software, also known as an application or an "app", is computer software designed to help the user to perform specific tasks. Examples include enterprise software, accounting software, office suites, graphics software and media players. Many application programs deal principally with...

 is not responding to system events.

The Apple Human Interface Guidelines officially refers to it as the "spinning wait cursor". Its colloquial names include "rainbow wheel", "pinwheel of misfortune", "marble of doom", "spinning rainbow disk", "spinning wheel of death", "happy crazy ball", "spinning rainbow wheel of death", "twirl", "beach ball
Beach ball
A beach ball is an inflatable ball for beach and water games. Their large size ball and light weight take little effort to propel; they travel very slowly and generally must be caught with two hands, making them ideal for lazy games and for children...

 of death" (BBoD), "hypnowheel", "spinning pizza", "spinning pinwheel", "spinning rainbow of death", "rainbow ball of doom", "the beach ball of hell", ,"spinning beach ball", "spinning beach ball of death", "pinwheel of death", and "spinny pinwheel of death" (SPOD).

History

A wristwatch
Watch
A watch is a small timepiece, typically worn either on the wrist or attached on a chain and carried in a pocket, with wristwatches being the most common type of watch used today. They evolved in the 17th century from spring powered clocks, which appeared in the 15th century. The first watches were...

 was the first wait cursor in early versions of Mac OS
Mac OS
Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...

. Apple's HyperCard
HyperCard
HyperCard is an application program created by Bill Atkinson for Apple Computer, Inc. that was among the first successful hypermedia systems before the World Wide Web. It combines database capabilities with a graphical, flexible, user-modifiable interface. HyperCard also features HyperTalk, written...

 first popularized animated cursors, including a spinning beach ball
Beach ball
A beach ball is an inflatable ball for beach and water games. Their large size ball and light weight take little effort to propel; they travel very slowly and generally must be caught with two hands, making them ideal for lazy games and for children...

 which could be advanced by repeated HyperTalk
HyperTalk
HyperTalk is a high-level, procedural programming language created in 1987 by Dan Winkler and used in conjunction with Apple Computer's HyperCard hypermedia program by Bill Atkinson. The main target audience of HyperTalk was beginning programmers, hence HyperTalk programmers were usually called...

 invocations of "set cursor to busy". The beach ball cursor was also adopted to indicate running script code in the HyperTalk-like AppleScript
AppleScript
AppleScript is a scripting language created by Apple Inc. and built into Macintosh operating systems since System 7. The term "AppleScript" may refer to the scripting system itself, or to particular scripts that are written in the AppleScript language....

.

These cursors would be activated by an application when it was performing a lengthy operation. (Microsoft Windows would later adopt the Apple Lisa
Apple Lisa
The Apple Lisa—also known as the Lisa—is a :personal computer designed by Apple Computer, Inc. during the early 1980s....

 hourglass/blue spiral cursor for the same concept.) Some versions of the Apple Installer used an animated "counting hand" cursor; other applications provided their own theme-appropriate custom cursors, such as Fetch
Fetch (FTP client)
Fetch is a full-featured GUI-based Mac OS-only FTP client made by Fetch Softworks. The latest version of Fetch is 5.6; the long-awaited version 5 was released on May 24, 2005. In addition to basic FTP functionality, Fetch includes such features as editing files without having to download them and...

's running dog, Retrospect
Retrospect (software)
Retrospect is a family of backup software applications for the Mac OS, Mac OS X, and Microsoft Windows operating systems. Its maker Dantz Development Corporation was acquired by EMC Corporation in 2004. In May 2010 Retrospect was sold to Roxio/Sonic Solutions. In 2011, development of Retrospect...

's spinning tape, and Pro Tools
Pro Tools
Pro Tools is a digital audio workstation platform for Microsoft Windows and Mac OS X operating systems, developed and manufactured by Avid Technology. It is widely used by professionals throughout the audio industries for recording and editing in music production, film scoring, film, and television...

' tapping fingers. Apple provided standard interfaces for animating cursors: originally the Cursor Utilities (SpinCursor, RotateCursor) and, in Mac OS 8
Mac OS 8
Mac OS 8 is an operating system that was released by Apple Computer on July 26, 1997. It represented the largest overhaul of the Mac OS since the release of System 7, some six years previously. It puts more emphasis on color than previous operating systems...

 and later, the Appearance Manager (SetAnimatedThemeCursor).

In Mac OS X, Apple gave the wheel rainbow colors and a more dynamic appearance. More significantly, Apple changed its meaning. Rather than being an indication that an application was performing an action it expected to take a while, it meant that the system software had noticed that an application had stopped responding to events. This could indicate that the application was in an infinite loop
Infinite loop
An infinite loop is a sequence of instructions in a computer program which loops endlessly, either due to the loop having no terminating condition, having one that can never be met, or one that causes the loop to start over...

, or just performing a lengthy operation and ignoring events.

Like many other Mac OS 9 to Mac OS X changes, this new wait cursor originated with NEXTSTEP
NEXTSTEP
NeXTSTEP was the object-oriented, multitasking operating system developed by NeXT Computer to run on its range of proprietary workstation computers, such as the NeXTcube...

 which eventually became the basis for Mac OS X. NEXTSTEP used a spinning rainbow optical disk cursor, since the first NEXT computers ran on removable and rewritable magneto-optical disks
Magneto-optical drive
A magneto-optical drive is a kind of optical disc drive capable of writing and rewriting data upon a magneto-optical disc. Both 130 mm and 90 mm form factors exist. The technology was introduced commercially in 1985...

. NeXT Computer, Inc., was awarded an international patent on this wait cursor technology.

Detailed explanation

Each application has an event queue
Message queue
In computer science, message queues and mailboxes are software-engineering components used for interprocess communication, or for inter-thread communication within the same process. They use a queue for messaging – the passing of control or of content...

 that receives events from the operating system (for example key presses and mouse button clicks). If an application takes too long to process the events in its event queue (regardless of the exact cause) the operating system displays the wait cursor whenever the cursor hovers over that application's windows. This threshold is 5 seconds in Mac OS X v10.4
Mac OS X v10.4
Mac OS X v10.4 Tiger is the fifth major release of Mac OS X, Apple's desktop and server operating system for Macintosh computers. Tiger was released to the public on 29 April 2005 for US$129.95 as the successor to Mac OS X Panther , which had been released 18 months earlier...

, but was previously 2 seconds.

This is meant to indicate that the application is temporarily unresponsive, a state from which the application may recover, however it may also indicate that the application has entered an unrecoverable state. This prevents the user from closing, resizing, or even minimizing the windows of that application. Users can choose to terminate an unresponsive application, by using "Force Quit" under the Apple menu, the keystroke command-option-escape, or the Force Quit command found by control-clicking (or right-clicking) the icon of an unresponsive application in the Dock.

While one application is unresponsive, typically other applications are usable in the meantime and may be used until the former becomes responsive again.

Guidelines, tools and methods for developers

Apple's guidelines suggest that developers try to avoid the spinning wait cursor, and suggest other user interface
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

 indicators, such as an asynchronous progress indicator
Progress indicator
A progress indicator is an element of a command line interface, a textual user interface, or a graphical user interface that is intended to inform the user that an operation is in progress, to reassure that the system is not hung or waiting for user input,...

.

Possible causes include:
  • By default, events (and any actions they initiate) are processed sequentially. This design works well when each event leads to only a trivial amount of processing, which causes the application to appear responsive. However, if the processing takes too long, the spinning wait cursor will appear until the operation is complete. Developers may prevent this happening by performing processing on a separate thread, allowing the application's main thread to continue responding to events. However, this greatly increases the application complexity.
  • Bugs in applications can cause them to stop responding to events; for instance, an infinite loop
    Infinite loop
    An infinite loop is a sequence of instructions in a computer program which loops endlessly, either due to the loop having no terminating condition, having one that can never be met, or one that causes the loop to start over...

     or a deadlock
    Deadlock
    A deadlock is a situation where in two or more competing actions are each waiting for the other to finish, and thus neither ever does. It is often seen in a paradox like the "chicken or the egg"...

    . Applications that do this rarely recover.
  • Problems with the virtual memory
    Virtual memory
    In computing, virtual memory is a memory management technique developed for multitasking kernels. This technique virtualizes a computer architecture's various forms of computer data storage , allowing a program to be designed as though there is only one kind of memory, "virtual" memory, which...

     system such as slow paging
    Paging
    In computer operating systems, paging is one of the memory-management schemes by which a computer can store and retrieve data from secondary storage for use in main memory. In the paging memory-management scheme, the operating system retrieves data from secondary storage in same-size blocks called...

     caused by a spun-down hard disk
    Hard disk
    A hard disk drive is a non-volatile, random access digital magnetic data storage device. It features rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is magnetically read from and written to the platter by read/write heads that float on a film of air above the...

     (or, potentially, read errors) will cause the wait cursor to appear. In this case, multiple applications will display the wait cursor as they attempt to access memory that must be paged in until the hard disk and virtual memory system recover.


Spin Control is an application that comes with the Mac OS X Developer Tools. It allows the user to monitor and sample applications that are either not responding or performing a lengthy operation. Each time an application does not respond and the spinning wait cursor is activated, Spin Control will sample the application to determine which code is causing the application to stop responding. With this information, the developer can rewrite code to avoid the cursor being activated.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK