I am not saying they cannot.
But you did. You said "because RPG programs are not thread-safe"
Don't report that the language is not thread-safe, when it is.

C programs are not always thread-safe either. But people still code multi-threaded c programs.

I am just saying you are crazy to do it.
Exactly. So you choose not to use it. Because it's too hard for you to learn or train or get adopted.
Whatever the reason is that's fine, it's still your choice.

RPG is not a language ever built to do multi-threading.
The same argument can be made for SQL. RPG wasn't "Built" to do SQL, SQL was added on later.
The language is being enhanced to do multi-threading.
Control Spec THREAD has been in the language for a long time.
File spec in sub-procedures is a more recent addition.
SERIALIZE keyword for a sub-procedure is a more recent addition.

Your problem is really this. It is not just one RPG program you have to worry about. How many people have a clean stack? In other words, no legacy code anywhere in the stack?

It's not all or nothing. The programmer just has to understand the ramifications of choosing to run non-threadsafe code. Or at a minimum, serialize the access to that program.

Every single program in the stack has to be coded for multi-threading.

It's not an all or nothing scenario.

Introduce one program in the stack that is not thread-safe and you have a disaster

Serialize exists for a reason.

and every programmer who is working on a program on that stack has to know and understand multi-threading. That is not simple.

Training has its advantages. But I agree that understanding the intricacies of multi-threaded programming is not for everyone.

Even in languages that support it, multi-threading is a difficult problem. It is not just something you slap in.

I totally agree. The program or system of programs should be designed and thought out, from the ground up, to be threadsafe.

No disrespect intended Alan. I love your work and have used lots of your samples and programs.
I just get tired of people reporting that something can't be done, when it really can, it just requires a little more knowledge.

Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.