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:

    Justice and truth are too such subtle points that our tools are too blunt to touch them accurately.
    Blaise Pascal (1623–1662)

    I think it is a wise course for laborers to unite to defend their interests.... I think the employer who declines to deal with organized labor and to recognize it as a proper element in the settlement of wage controversies is behind the times.... Of course, when organized labor permits itself to sympathize with violent methods or undue duress, it is not entitled to our sympathy.
    William Howard Taft (1857–1930)