Yes; indeed. The concurrency package I am proposing is designed to be
the basis of more complex and powerful concurrency models which ride
on top. The jobs thing is an example. My main concern is that the
threads package I have built on SBCL should be portable across
concurrent platforms.
Indeed global assignments do not work well with concurrency as
observed in TBoS
QUOTE
The last reason for avoiding destructive operations is concerned with
a topic outside this book, concurrency; defined as the apparent
ability of a computer to sustain multiple simultaneous computational
processes. Following the destructive model can create programs whose
output is highly unpredictable.
For example, suppose we split a computation into two parallel
processes; a process A that takes a global *counter* and destructively
subtracts 2 and a process B that takes the same global and
destructively doubles it. The final value of *counter* is inherently
unpredictable.
For example, if *counter* = 4 and process A is applied and then
process B; then *counter* is set to 2 by A and to 4 by B. But if B
reaches *counter* before A, then *counter* is set to 8 by B and to 6
by A. The final value is therefore 4 or 6 depending on the order in
which the processes are applied.
UNQUOTE
Mark