---
name: "al_iphone_program_has_halted"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.0.10-3"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_iphone_program_has_halted"
---

# al\_iphone\_program\_has\_halted(3alleg5)

Allegro 5 API

## NAME

al\_iphone\_program\_has\_halted - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_iphone.h>
  void al_iphone_program_has_halted(void)
  ```

## DESCRIPTION

Multitasking on iOS is different than on other platforms. When an application receives an ALLEGRO\_DISPLAY\_SWITCH\_OUT or ALLEGRO\_DISPLAY\_CLOSE event on a multitasking-capable device, it should cease all activity and do nothing but check for an ALLEGRO\_DISPLAY\_SWITCH\_IN event. To let the iPhone driver know that you've ceased all activity, call this function. You should call this function very soon after receiving the event telling you it's time to switch out (within a couple milliseconds). Certain operations, if done, will crash the program after this call, most notably any function which uses OpenGL. This function is needed because the "switch out" handler on iPhone can't return until these operations have stopped, or a crash as described before can happen.
