- 论坛徽章:
- 0
|
看了IBM网站上的最新消息:
http://publib.boulder.ibm.com/in ... .doc/c092507635.htm
你是怎么启动新线程的呢?能不用JAVA, C++ API, 真是太有才了。IBM不请你去当研发部总裁真是亏待了你!
干了20年还搞不清楚thread safe和multithread的差别,你咋那么不长进呢?
我发誓不再理会你这个概念不清的家伙了!
Multithreaded Applications
The iSeries system now supports multithreading. ILE RPG does not directly support initiating or managing program threads. However, ILE RPG procedures can run as threads in multithreaded environments. If you want to call an ILE RPG procedure in a multithreaded application, you must ensure that the ILE RPG procedure is threadsafe. You must also ensure that any system functions that your procedure accesses are also threadsafe.
The THREAD(*SERIALIZE) control specification keyword can be specified to help you achieve thread safety for an ILE RPG module. Specifying THREAD(*SERIALIZE) will protect most of your variables and all your internal control structures from being accessed improperly by multiple threads. The thread safe module will be locked when a procedure in the module is entered and unlocked when when no procedure in the module is still running. This serialized access, ensures that only one thread is active in any one module, within an activation group, at any one time. However, it is still up to the programmer to handle thread safety for storage that is shared across modules. This is done by adding logic in the application to synchronize access to the storage.
For more information, see Multithreading Considerations.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.
[ 本帖最后由 franliu 于 2009-11-30 09:09 编辑 ] |
|