Highlighted
Absent Member.
Absent Member.
230 views

[archive] Threads And C$system

[Migrated content. Thread originally posted on 28 August 2008]

I am calling a compression utility to perform a save of user data. I need to have the exit status value from the process so i do not use the CSYS-ASYNC. The manual states that this will cause the cobol program to wait for the command execuited to finish.
So, I performed a paragraph in a thread and this paragraph did the call to c$system. Nevertheless, the main thread also does not continue until the command to the c$system has completed and I placed it into a thread as want to do things whilst this command is processing.
I make the presumption that maybe ALL threads are paused whilst c$system executes although I do not know why this would be, and the manual makes no reference to threads and c$system used together?
Does anyone know how I could do that I want to do using c$system?
0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

RE: [archive] Threads And C$system

The answer is that the runtime does not use operating system threads for portability reasons.

Because of this, when you turn control over to another program (such as through CALL C$SYSTEM), the runtime's thread switcher is blocked from executing until that program finishes.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.