Running Serialized in Multiple Threads

Specifying THREAD(*SERIALIZE) will protect most of your variables and all your internal control structures from being accessed improperly by multiple threads. The thread-serialized module will be locked when a thread starts running any procedure in the module, and only unlocked when the thread is no longer running in the module. When the module is locked, no other thread can run a procedure in the module. If another thread is trying to call a procedure in the module, it must wait for the module to be unlocked before it can run the procedure. This serialized access ensures that only one thread is active in a thread-serialized module, within an activation group, at any one time.



[ Top of Page | Previous Page | Next Page | Contents | Index ]