Since a CGI application runs as one thread (single thread) in the process of the CGI application itself, there can't be a resource shared among multiple threads in the same process.
Since an ISAPI application runs as multiple threads (multi-thread) in the process of IIS itself, a resource can be shared among the multiple threads.
If a resource is shared among multiple threads in an ISAPI application, synchronization control must be performed on the shared resource so that no contention occurs for it. Depending on the shared resource, the synchronization control is performed either automatically by the COBOL run-time system or by the ISAPI application itself using the "thread synchronization control subroutine" provided in COBOL.
For details, see "Multithread" of the "NetCOBOL User's Guide".
"Sharing a Resource among Threads"
"Thread Synchronization Control Subroutine"