Ending multithreaded programs
You can end a multithreaded program by using GOBACK
, EXIT
PROGRAM
, or STOP RUN
.
About this task
Use GOBACK
to return to the caller
of the program. When you use GOBACK
from the first
program in a thread, the thread is terminated. If
that thread is the initial thread in an enclave, the entire enclave
is terminated.
Use EXIT PROGRAM
as you
would GOBACK
, except from a main program where it
has no effect.
Use STOP RUN
to
terminate the entire Language Environment® enclave
and to return control to the caller of the main program (which might
be the operating system). All threads that are executing within the
enclave are terminated.
Related concepts
Language Environment Programming Guide (What happens during termination:
enclave termination)
Language Environment Programming Guide (What happens during termination:
enclave termination)