Did you know ... Search Documentation:
PL_thread_at_exit()