Threads considerations for ILE C and ILE C++ languages
You must evaluate the existing Integrated Language Environment® (ILE) C and ILE C ++ applications for thread safety before calling them in a multithreaded job. If your program is not threadsafe, techniques are available for calling programs that are not threadsafe from multithreaded jobs.
Not all ILE C/ C++ library functions are threadsafe. Before calling your application in a multithread-capable job, see WebSphere® Development Studio: ILE C/C++ Compiler Reference PDF and Standard C++ Library Reference PDF to determine whether all of your functions are threadsafe.
If
necessary, perform the following actions:
- Recreate ILE C or ILE C++ applications
Compile and bind all existing ILE C or ILE C++ applications with TGTRLS(*CURRENT) before you call them in a multithreaded job.
- When targeting IBM® i
6.1 or earlier releases, eliminate *NEW activation groups.Do not use *NEW activation groups in multithreaded applications in IBM i 6.1. Beginning with IBM i 7.1, if your application is designed correctly, you might be able to use *NEW activation group programs in a secondary thread. See Activation groups and threads for more information.Note: ACTGRP(*ENTMOD) is the default on the Create Program (CRTPGM) command. For ILE C and ILE C++, ACTGRP(*ENTMOD) causes a program to be created as if ACTGRP(*NEW) were specified. Programs created by using the Create Bound C Program (CRTBNDC) command or the Create Bound C++ Program (CRTBNDCPP) command have an activation group attribute of *NEW.