---
name: "al_join_thread"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_join_thread/3alleg5"
---

# al\_join\_thread(3alleg5)

Allegro 5 API

## NAME

al\_join\_thread - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  void al_join_thread(ALLEGRO_THREAD *thread, void **ret_value)
  ```

## DESCRIPTION

Wait for the thread to finish executing. This implicitly calls al\_set\_thread\_should\_stop(3alleg5) first.

If `ret_value` is non-`NULL`, the value returned by the thread function will be stored at the location pointed to by `ret_value`.

## SEE ALSO

al\_set\_thread\_should\_stop(3alleg5), al\_get\_thread\_should\_stop(3alleg5), al\_destroy\_thread(3alleg5).
