A function is threadsafe if you can start it simultaneously in
multiple threads within the same process. A function is threadsafe if and
only if all the functions it calls are also threadsafe.
Storage usage and threaded applications
When writing a threaded application, it is important to understand the visibility and scope of various classes of storage.
Job-scoped resources and thread safety
Many system and application resources are available only within a defined job. When writing a multithreaded application or service, you must evaluate your use of job-scoped resources. The use of these resources must not conflict with or negatively affect other threads in the process.
API thread safety classifications Before using an API, you should determine if
it is safe to call that API in your multithreaded program.
CL commands and thread safety
The Integrated
Language Environment® (ILE) CL run time and compiler-generated code are
threadsafe. Original program model (OPM) CL programs are not threadsafe.
Denied access functions and thread safety
To prevent problems in system integrity and data damages, certain APIs and commands are either conditionally threadsafe or not threadsafe. These APIs and commands deny all or partial access.
Exit points
The i5/OS™ registration
facility allows you to define exit points for functions in an application
and to register programs that run at those exit points.