Indicates to the compiler that the program uses multiple threads. Always use this option when compiling or linking multi-threaded applications. This option ensures that all optimizations are thread-safe.
>>- -q--+-nothreaded-+----------------------------------------->< '-threaded---'
The default is -qthreaded when compiling with _r invocation modes, and -qnothreaded when compiling with other invocation modes.
This option applies to both compile and linker operations.
To maintain thread safety, a file compiled with the -qthreaded option, whether explicitly by option selection or implicitly by choice of _r compiler invocation mode, must also be linked with the -qthreaded option.
This option does not make code thread-safe, but it will ensure that code already thread-safe will remain so after compile and linking.
Related information