Hi, Dick,

One other thought on this...

[EMAIL PROTECTED] wrote:
> 
> Hi List,
> 
> I am bored ...
> 
> Does the evaluation of the expression:   a + b
> 
>      Happen synchronously, or asynchronously
> 
> Are the values of 'a' and 'b' currently exclusive to the process
> that can perform the '+' operation or are they in 'shared' mode ?
> 

As pointed out previously, REBOL is single-threaded.  However (as
usual with REBOL), there's more to the story.  The values/behaviors
of the words A and B above may be "entangled" in other ways that we
can't observe just from that fragment of code.  For example:

    hidden_counter_1: hidden_counter_2: 0
    a: func [] [
        hidden_counter_1: hidden_counter_1 +
            hidden_counter_2: hidden_counter_2 + 1
    ]
    b: func [] [
        hidden_counter_1: hidden_counter_1 + hidden_counter_2
        hidden_counter_2: hidden_counter_2 + 1
        hidden_counter_1
    ]

In this case, the value of A + B would differ from the value of
B + A due to their mutual involvement with hidden state.

I realize that this isn't specifically about traditional concurrency,
but long ago I stopped interpreting "concurrent" as "happening at the
same time" and began interpreting it as "may happen (or be interleaved)
in an arbitrary order" which makes it a much more interesting concept
IMHO.

-jn-



-- 
; Joel Neely                             joeldotneelyatfedexdotcom
REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip
do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] {
| e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to