×
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.
Christen, Duane wrote:
We're at 6.1.
With the enhancements to RPGIV thread handling in 6.1 I tested
another Java interface process with and without *SERIALIZE and found
no problems with the results but performance of the process without
*SERIALIZE was much better.
This may bite me later, but I have a note in the production source as
to the reason Thread(*SERIALIZE) is not set and a caveat to put it in
if problems occur.
I don't know that leaving Thread(*SERIALIZE) off is "good" or "bad"
but it seems to work. I assume someone (Scott? :)) will tell me if I
am being foolish in my assumptions.
The enhancements to RPGIV thread handling provide another way to be
threadsafe by coding THREAD(*CONCURRENT). They don't have any effect at
all if you don't code the THREAD keyword. If you haven't coded any
THREAD keyword at all, and your RPG code does ever get called from
multiple Java threads at once time, then you will not be threadsafe.
I wouldn't code THREAD(*CONCURRENT) unless I knew for sure that my RPG
code was going to run multi-threaded, and even then, I might code
THREAD(*SERIALIZE).
When there is a possibility of running multi-threaded, the THREAD
keyword should be coded. But remember that coding the THREAD keyword
only provides thread-safety for the static storage in your RPG modules.
It doesn't actually make you thread safe; there are other
thread-safety issues that you have to consider.
If the Java code you're calling can never call back into your native
code, you might be ok not coding the THREAD keyword. But it's not a
valid test to just try your application without the THREAD keyword and
if nothing goes wrong, assume it's ok. If you did happen to become
multi-threaded in your native code, there's no guarantee that any one
test run would expose a possible thread-safety issue. (Compare to a
driver who says they have tried ignoring the red lights at that
intersection, and it seems to be ok.)
So, some analysis is needed to determine whether you need the THREAD
keyword or not.
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.