skip to main content

Accessing from isCOBOL : Multithread programs

Multithread programs
c-tree is thread safe but the connection to the c-tree server is bind to the life of the thread that performed it. According to this rule, it’s important that the thread that performs the first open of a c-tree file establishing a connection to the c-tree server stays alive for the whole runtime session.
Consider the following sample situation: there is a main menu program from which you can call sub programs. The sub programs are called in thread so that the user can switch from one to another any time. The sub programs perform i/o on c-tree files. In a situation like this, the user can perform the following steps:
1.
2.
3.
4.
The menu program, Customer Handling and Statistics are three separate threads. In this situation it's important that the first open of a c-tree file is done by the menu program and not by Customer Handling, otherwise as soon as Customer Handling terminates (step 4), the connection to c-tree is lost and the other programs running in the runtime session, like Statistics, will encounter i/o errors.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left