Spinning Wait Cursor - Guidelines, Tools and Methods For Developers

Guidelines, Tools and Methods For Developers

Apple's guidelines suggest that developers try to avoid the spinning wait cursor, and suggest other user interface indicators, such as an asynchronous progress indicator.

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 or a deadlock. Applications that do this rarely recover.
  • Problems with the virtual memory system such as slow paging caused by a spun-down hard disk (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.

Read more about this topic:  Spinning Wait Cursor

Famous quotes containing the words tools and/or methods:

    A life I didn’t choose
    chose me: even
    my tools are the wrong ones
    for what I have to do.
    Adrienne Rich (b. 1929)

    Crime is terribly revealing. Try and vary your methods as you will, your tastes, your habits, your attitude of mind, and your soul is revealed by your actions.
    Agatha Christie (1891–1976)