I've also had extensive experience with threads and multi-threading. Just
not on the AS/400, but the concepts are all the same.

Some things to remember:

1) It makes debuging a lot harder!

2) Never allow 2 threads to modify the same chunk of data at the same time.
*ALWAYS* surround the updates with a critical section.

3) Critical Sections should be very small. Lock it, update it, release it.
You can have a "deadly embrace" otherwise. And these are hard to debug.

4) Dont over do it. To many threads gets hard to handle, complicated and
doesnt perform well.

5) Starting a thread nicely is easy. Terminating it is much harder to do!
But terminating nicely is important.

6) Do it "Right" right from the git go. Do not slap the code together
expecting to come back later and clean things up. Actually, this is a good
one for ANY programing! But it applies 10x as much in
a multi-threaded environment.

These issues are not hard to deal with. But they must be dealt with or your
app will become very unstable.

Bob Crothers
“The greater danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it.”
- Michelangelo

On Wed, Mar 3, 2010 at 12:32 PM, James H. H. Lampert <
jamesl@xxxxxxxxxxxxxxxxx> wrote:

Bruce Vining wrote:
Yes, I'm familiar with threads and multi-threaded jobs :)

Any recommendations on where to start relieving my own ignorance (and
please, no sarcastic links to "lmgtfy.com")?

How difficult are they to deal with? What languages support threads? At
what OS level do they become possible/practical?

This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.

This thread ...


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

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