Thu, 17 Mar 2005 11:27:39 -0500
<[log in to unmask]
> (Colin Paul Gloster's message of
"Thu, 17 Mar 2005 11:39:43 +0100")
Colin Paul Gloster <[log in to unmask]> writes:
> Actually "task" is Ada's term for "process" not "thread".
Hmm. In my experience, people use the term "process" for things that
have separate address spaces. Ada tasks share a single address space;
they can all access the same global variables. See ARM95 9 (8), and
> A process could have a number of subprocesses called threads which
> share data without mutual exclusion from the same process, like in
> POSIX or pthreads but thankfully not Ada.
Hmm. Ada permits two different tasks to access the same global
variable. If the global is declared Volatile, it can be safe. Ada also
provides higher-level abstractions for inter-task communication;
rendezvous and protected objects.
An Ada task is quite close to a POSIX pthread; the GNAT runtime uses
pthreads on platforms where it is available.
Ada allows programmers to shoot themselves in the foot; it just makes
it clear they are doing that :).