|
Thanks for the responses guys, that does clear things up for us. And yes
Scott, I did misspeak on Apache, those are separate jobs. We'll have to
discuss it here, but I'm thinking Apache is the way we will have to go then
so we don't have one call waiting on another.
On Thu, Nov 23, 2023 at 7:54 AM Niels Liisberg <nli@xxxxxxxxxxxxxxxxx>
wrote:
As always - Scott is 100% right!applications
The construction where you need to call programs that are not
multi-thread aware can also be used as Scott is explaining.
il_enterThreadSerialize();
CLPGM();
il_exitThreadSerialize();
This construction allows you to queue up and execute "normal"
like pearls on a chain.rpg400-l@xxxxxxxxxxxxxxxx>
On Wed, Nov 22, 2023 at 11:37 PM Scott Klement <
wrote:you
Hi Rick,
I'm no expert on ILEastic, but I'm going to guess that
il_enterThreadSerialize and il_exitThreadSerialize would be called when
you want to serialize access to something. For example, suppose you
are calling a CL program that wasn't written in a threadsafe manner,
tocould do:
il_enterThreadSerialize();
CLPGM();
il_exitThreadSerialize();
This would allow only one thread at a time to call CLPGM() (that's what
"serialize" means.) The threads all run concurrently until they get
thethe il_enterThreadSerialize(), but between the enter/exit calls, only
one thread can run. so the others stop and wait for the first thread,
when the first thread is done, the second will run, etc... until all
inthreads have run the code between the enter/exit calls.for
With regards to Apache... by default it runs multiple RPG programs in
separate jobs (rather than separate threads.) So there's no need to
worry about threadsafety in this case. If you decided to enable
multi-threaded support that would, of course, change that... at which
point you'd need to code for the threadsafety just as you are doing in
ILEastic.
-SK
On 11/22/23 3:53 PM, Rick Rauterkus via RPG400-L wrote:
I have been playing around with Apache and ILEastic to set up a webservice
that will call a process in our existing application. I have both ofthem
working, but have a question on threads.
ILEastic says the RPG programs have to be compiled with
Thread(*Concurrent). I did that with the front end program I created
the ILEastic server, but do I need to do that with all the programs
sincetheof
existing application that could be called by this process also? None
used.the existing programs will use the ILEastic procedures at all. I see
ILEastic includes il_exitThreadSerialize and il_enterThreadSerialize
procedures, but I cannot find anything on how or if they should be
And I guess I have the same concern on going the Apache route too
relatedprogramsthat also uses threads. Is it safe to call existing application
from these web service interfaces without having to modify them?--
Thanks for your input! This is new territory for us.
Rick
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
--questions.--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
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.