1748022 Members
5000 Online
108757 Solutions
New Discussion юеВ

Re: cobol thread options

 
Ignacio Javier
Regular Advisor

cobol thread options

Hi everybody:

I am trying to make a program than creates a thead that creates another thread.
Then i want to finish de first thread and automatically finish its sun.

I have made a test program but it does not work. The father it┬┤s independent and the son still lives.

Do you guys know if there is any manner to do this. A thread create option or somthing like that ?

Thanks in advance
2 REPLIES 2
Dennis Handly
Acclaimed Contributor

Re: COBOL thread options

I doubt there is anyone here that knows MF COBOL but you. ;-) So we can only answer at a system call or C level.

Threads are completely independent. If you want the parent thread to stop the child, you must use pthread_kill or pthread_cancel. Or for joinable threads, you can use pthread_join to wait for the child.

susan gregory_1
Valued Contributor

Re: cobol thread options

Hi Ignacio,
You should go to the MF web site. At their documentation web page, in their bookshelf for Server Express there is a Multi-Threaded Programming manual that discusses how to create COBOL multi-threaded applications.
You don't need a support contract with MF in order to get to the manuals at their site. Here's the one for Server Express 2.2. I think all the other bookshelves will have the same manuals.

http://supportline.microfocus.com/documentation/books/sx22sp1/mtpubb.htm

Good luck!