×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
OK, general question - no real need to do this but I'm just interested in
knowing the answer:
We all know RPG is not a mutlti-threaded language, but would it be
reasonable in RPG to use pthread_create() to create new threads and use
pthread_mutex_lock() and pthread_mutex_unlock() to protect critical code? I
know we can use spawn and BCI jobs, but can we create a pthread and call a
RPG (sub)procedure in it? I'm guessing spawn doesn't really create a POSIX
thread and uses a BCI job instead. Or is it all the same?
A follow-on question would be if we can't create threads in RPG using
pthread_create(), can we still use mutexes in RPG code that is called from a
multi-threaded language? I know further support will be provided in the next
OS release so we don't have to serialize the threads when calling RPG from
java but I was wondering if we could roll-our-own 'very limited'
multi-threaded support using mutexes.
Your thoughts on this would be most welcome.
Cheers
Larry Ducie
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.