• Subject: Re: Threadsafe
  • From: "Nathan M. Andelin" <nathanma@xxxxxxxxx>
  • Date: Thu, 26 Apr 2001 10:01:06 -0600

> From: mpantzop@csc.com.au

> I've seen the word 'threadsafe'  in various commands (I can't think of
them
> off-hand unfortunately) and was wondering whether the word referred to the
> ability to maintain 'state' within a job.  I was also wondering if it had
> any conoctation with the java concept?

A thread is an independent process that runs within a job.  Some jobs, like
the OS/400 HTTP server may have hundreds of threads running concurrently.
Remember that many memory allocations and variables are scoped to the Job.
Each thread might hold references to the same memory and be doing the same
thing.  Threads, like all processes, follow a line of execution.  They have
a beginning and an ending.  They can be run within multiple continuous
loops.  A Job that allows threads to change the same memory independent of
one another are not threadsafe.  Threadsafe jobs usually employ some
mechanism to lock memory that is shared by multiple threads so that only one
thread can modify it during its line of execution.  This is important,
because a thread's line of execution can be interrupted when the OS decides
the thread's CPU timeslice is up.

Java is one language that has the ability to run multiple threads within a
single job, and provides syntax to enable programmers to synchronize threads
so they don't clobber each others shared memory during their line of
execution.

Nathan.


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

This thread ...


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

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